80ee39154b951c2c50ae2067f560aad81510a13f,tests/word_sent/test_word_sent.py,,load_input,#Any#,12
Before Change
def load_input(input_file):
text = io.open(input_file, "r", encoding="utf-8").read().split("\n")[0]
if sys.version_info >= (3, 0):
return text
else:
return text.decode("utf-8")
def load_output(output_file):
if sys.version_info >= (3, 0):
After Change
def load_input(input_file):
with io.open(input_file, "r", encoding="utf-8") as f:
text = f.read().split("\n")[0]
if sys.version_info >= (3, 0):
return text
else:
return text
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: 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_input
Project Name: biolab/orange3
Commit Name: b535452389d79b579dd499374bab66b4ecc87f1f
Time: 2016-11-24
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/data/owpythonscript.py
Class Name: OWPythonScript
Method Name: onAddScriptFromFile
Project Name: huyingxi/Synonyms
Commit Name: caf046f34fbde018e95c2b392401730be67e46f5
Time: 2020-09-24
Author: hain@chatopera.com
File Name: synonyms/jieba/analyse/tfidf.py
Class Name: IDFLoader
Method Name: set_new_path