5e7a5ee56847be985d62b4f07bdc7c3e587e09b2,tests/pos_tag/test_pos_tag.py,,load_input,#Any#,12

Before Change



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


def load_output(input_file):

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: 10

Instances


Project Name: undertheseanlp/underthesea
Commit Name: 5e7a5ee56847be985d62b4f07bdc7c3e587e09b2
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/pos_tag/test_pos_tag.py
Class Name:
Method Name: load_input


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: THUNLP-MT/THUMT
Commit Name: 051bd416d3c41002f6d58b9dd71516a27243d178
Time: 2017-11-11
Author: playinf@stu.xmu.edu.cn
File Name: thumt/launcher/ensemble_translator.py
Class Name:
Method Name: main