c7b0a1d3625c9eb3891f10dfdc29b2063c624f69,pythainlp/postaggers/thaipos.py,,,#,5
Before Change
import pythainlp
import os
import pickle
templates_dir = os.path.join(os.path.dirname(pythainlp.__file__), "postaggers")
template_file = os.path.join(templates_dir, "thaipos.pickle")
def data():
with open(template_file, "rb") as handle:
data = pickle.load(handle)
return data
After Change
// แปลง pickle เป็น json
import json
with open(template_file, "rb") as handle:
data = pickle.load(handle)
with open("thaipos.json", "w") as f:
json.dump(data, f, ensure_ascii=False)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances Project Name: PyThaiNLP/pythainlp
Commit Name: c7b0a1d3625c9eb3891f10dfdc29b2063c624f69
Time: 2016-07-13
Author: wannaphong@yahoo.com
File Name: pythainlp/postaggers/thaipos.py
Class Name:
Method Name:
Project Name: rodluger/starry
Commit Name: 6ce0cc4d818237c431f80adef2196f4549469483
Time: 2021-02-18
Author: rodluger@gmail.com
File Name: tests/greedy/test_load.py
Class Name:
Method Name: test_load_normalization
Project Name: PyThaiNLP/pythainlp
Commit Name: c7b0a1d3625c9eb3891f10dfdc29b2063c624f69
Time: 2016-07-13
Author: wannaphong@yahoo.com
File Name: pythainlp/postaggers/thaipos.py
Class Name:
Method Name:
Project Name: Hironsan/anago
Commit Name: b31b0157be35bda89ce8581a494213572b94182b
Time: 2017-11-18
Author: light.tree.1.13@gmail.com
File Name: tests/eval_test.py
Class Name: EvaluatorTest
Method Name: test_eval
Project Name: nipy/dipy
Commit Name: 5b15a19f2bd0662b7e466a101077f6c063f7ff4e
Time: 2010-12-19
Author: garyfallidis@gmail.com
File Name: dipy/reconst/dti.py
Class Name:
Method Name: quantize_evecs