af3e59f100e8d8444fabac6d2555711071f03a4b,pythainlp/corpus/ttc.py,,word_freqs,#,16
Before Change
Get word frequency from Thai Textbook Corpus (TTC)
path = get_full_data_path("ttc_freq.txt") // try local copy first
if not os.path.exists(path): // if fail, download from internet
download_data("ttc")
with open(path, "r", encoding="utf8") as f:
lines = f.read().splitlines()
f.close()
listword = []
for line in lines:
After Change
Get word frequency from Thai Textbook Corpus (TTC)
lines = list(get_corpus(_FILENAME))
listword = []
for line in lines:
listindata = line.split("\t")
listword.append((listindata[0], int(listindata[1])))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: PyThaiNLP/pythainlp
Commit Name: af3e59f100e8d8444fabac6d2555711071f03a4b
Time: 2019-04-12
Author: arthit@gmail.com
File Name: pythainlp/corpus/ttc.py
Class Name:
Method Name: word_freqs
Project Name: pytorch/text
Commit Name: 2f77be52d2d379a6665af57fb126e9c69490ef00
Time: 2017-01-17
Author: jekbradbury@gmail.com
File Name: torchtext/data.py
Class Name: Dataset
Method Name: __init__
Project Name: reinforceio/tensorforce
Commit Name: d8a1abca5431a8b957cd0fc0a81e0ecbf509e57b
Time: 2018-02-17
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/core/memories/prioritized_replay.py
Class Name: PrioritizedReplay
Method Name: tf_retrieve_timesteps
Project Name: HyperGAN/HyperGAN
Commit Name: 1e339c1a0a186da155c9dc2ab8798075d248dc3e
Time: 2018-11-06
Author: mikkel@255bits.com
File Name: hypergan/optimizers/curl_optimizer.py
Class Name: CurlOptimizer
Method Name: apply_gradients