80ee39154b951c2c50ae2067f560aad81510a13f,tests/word_sent/test_word_sent.py,,load_output,#Any#,21

Before Change


    if sys.version_info >= (3, 0):
        return [text for text in open(output_file, "r").read().strip().split("\n")]
    else:
        return [text.decode("utf-8") for text in open(output_file, "r").read().strip().split("\n")]


def save_temp(id, output):

After Change




def load_output(output_file):
    with io.open(output_file, "r", encoding="utf-8") as f:
        content = f.read().strip()
        return [text for text in content.split("\n")]


def save_temp(id, output):
    test_dir = join(dirname(__file__), "samples", "accuracy")
    temp_file = join(test_dir, "%s.tmp" % id)
    content = u"\n".join(output)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: undertheseanlp/underthesea
Commit Name: 80ee39154b951c2c50ae2067f560aad81510a13f
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/word_sent/test_word_sent.py
Class Name:
Method Name: load_output


Project Name: onnx/onnx-coreml
Commit Name: 089e74514870c8e392d4a46669a5423e093cfb0b
Time: 2018-12-26
Author: dawars00@gmail.com
File Name: setup.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: c585a9779e5d8ae0b0b148792f8a7f8cecf73532
Time: 2019-02-12
Author: skab12@gmail.com
File Name: tools/make_examples.py
Class Name:
Method Name: