0bf6441863433575aebcbd0b238d27d95830c015,spacy/cli/converters/iob2json.py,,iob2json,#,10

Before Change


    
    Convert IOB files into JSON format for use with train cli.
    
    docs = []
    for group in minibatch(docs, n_sents):
        group = list(group)
        first = group.pop(0)
        to_extend = first["paragraphs"][0]["sentences"]
        for sent in group[1:]:
            to_extend.extend(sent["paragraphs"][0]["sentences"])
        docs.append(first)
    return docs


def read_iob(raw_sents):

After Change


    
    Convert IOB files into JSON format for use with train cli.
    
    sentences = read_iob(input_data.split("\n"))
    docs = merge_sentences(sentences, n_sents)
    return docs

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: explosion/spaCy
Commit Name: 0bf6441863433575aebcbd0b238d27d95830c015
Time: 2019-05-11
Author: ines@ines.io
File Name: spacy/cli/converters/iob2json.py
Class Name:
Method Name: iob2json


Project Name: nilearn/nilearn
Commit Name: 9df22084c5753cd5b3480afddee054dcdd774438
Time: 2017-05-29
Author: dkamalakarreddy@gmail.com
File Name: nilearn/datasets/atlas.py
Class Name:
Method Name: fetch_atlas_harvard_oxford


Project Name: ellisdg/3DUnetCNN
Commit Name: e9f288f691ca2d7244bc64c125a48887e47a0f2c
Time: 2017-11-17
Author: david.ellis@unmc.edu
File Name: brats/preprocess.py
Class Name:
Method Name: convert_brats_folder