244940504e919a9f5c4e191f3d121ecebec00950,tests/chunking/test_chunking.py,,load_input,#Any#,12

Before Change




def load_input(input_file):
    if sys.version_info >= (3, 0):
        content = [text.split("\t")[0] for text in open(input_file, "r", encoding="utf-8").read().strip().split("\n")]
        content = " ".join(content)
        return content
    else:
        content = [text.split("\t")[0].decode("utf-8") for text in open(input_file, "r").read().strip().split("\n")]
    content = u" ".join(content)
    return content

After Change




def load_input(input_file):
    lines = read(input_file).strip().split("\n")
    content = [line.split("\t")[0] for line in lines]
    content = u" ".join(content)
    return content
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: undertheseanlp/underthesea
Commit Name: 244940504e919a9f5c4e191f3d121ecebec00950
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/chunking/test_chunking.py
Class Name:
Method Name: load_input


Project Name: ultralytics/yolov3
Commit Name: 5a9fb2411d89749c9afad21bee50c67b1b2afc1e
Time: 2019-08-15
Author: glenn.jocher@ultralytics.com
File Name: utils/parse_config.py
Class Name:
Method Name: parse_model_cfg


Project Name: shibing624/pycorrector
Commit Name: 4e144c9f842d7415d8be5bdbb5912d88ae32cced
Time: 2018-04-16
Author: 507153809@qq.com
File Name: pycorrector/seq2seq/corpus_reader.py
Class Name: CGEDReader
Method Name: read_samples_by_string