244940504e919a9f5c4e191f3d121ecebec00950,tests/chunking/test_chunking.py,,load_input,#Any#,12
Before Change
def load_input(input_file):
if sys.version_info >= (3, 0):
content = [text.split("\t")[0] for text in open (input_file, "r", encoding="utf-8").read().strip().split("\n")]
content = " ".join(content)
return content
else:
content = [text.split("\t")[0].decode("utf-8") for text in open(input_file, "r").read().strip().split("\n")]
content = u" ".join(content)
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
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances 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: facebook/FAI-PEP
Commit Name: 9f67a534bce1063693d7716df11311e7584b6786
Time: 2018-12-11
Author: feisun@fb.com
File Name: libraries/python/classification_compare.py
Class Name: OutputCompare
Method Name: getData
Project Name: pysb/pysb
Commit Name: 31bedbc4d8d62fc42a7c9a20dd51c372cb510447
Time: 2017-05-02
Author: ben.gyori@gmail.com
File Name: pysb/kappa.py
Class Name:
Method Name: _parse_kasim_outfile
Project Name: ultralytics/yolov3
Commit Name: 5a9fb2411d89749c9afad21bee50c67b1b2afc1e
Time: 2019-08-15
Author: glenn.jocher@ultralytics.com
File Name: utils/parse_config.py
Class Name:
Method Name: parse_model_cfg