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)
After Change
// return data
// แปลง 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: 3
Non-data size: 9
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: 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: scikit-image/scikit-image
Commit Name: ddfac3e42d2ae2e09751de6638d813c76e30ff94
Time: 2018-12-04
Author: mark.harfouche@gmail.com
File Name: tools/check_sdist.py
Class Name:
Method Name:
Project Name: sony/nnabla
Commit Name: b164980f08f3ed7740439b51d4e5ca79db0d149e
Time: 2018-11-14
Author: Yukio.Oobuchi@sony.com
File Name: doc/conf.py
Class Name:
Method Name: