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):
    with io.open(input_file, "r", encoding="utf-8") as f:
        lines = [text.split("\t") for text in f.read().strip().split("\n")]
        output = []

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: 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: estnltk/estnltk
Commit Name: 158e4cb12d7ab478ea230e099a18644b2ac2bd17
Time: 2015-07-01
Author: tpetmanson@gmail.com
File Name: estnltk/corpus.py
Class Name:
Method Name: read_json_corpus


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_output