80ee39154b951c2c50ae2067f560aad81510a13f,tests/word_sent/test_word_sent.py,,load_output,#Any#,21
Before Change
def load_output(output_file):
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):
test_dir = join(dirname(__file__), "samples", "accuracy")
temp_file = join(test_dir, "%s.tmp" % id)
content = u"\n".join(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")]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: commonsense/conceptnet5
Commit Name: db4b9f4d50af9e83733fc301c32e85cbe6d9c812
Time: 2014-02-25
Author: rob@luminoso.com
File Name: conceptnet5/builders/json_to_csv.py
Class Name:
Method Name: convert_to_tab_separated
Project Name: commonsense/conceptnet5
Commit Name: db4b9f4d50af9e83733fc301c32e85cbe6d9c812
Time: 2014-02-25
Author: rob@luminoso.com
File Name: conceptnet5/builders/json_to_solr.py
Class Name:
Method Name: convert_to_solr