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()
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: 3
Non-data size: 4
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: deepfakes/faceswap
Commit Name: 309470af087c64cb91de6ec6decbd50f43becf90
Time: 2018-03-10
Author: hyyrynen.lasse@gmail.com
File Name: lib/cli.py
Class Name: DirectoryProcessor
Method Name: load_filter
Project Name: chartbeat-labs/textacy
Commit Name: e17791b533f7646674f357a90785eeb0fdefeb66
Time: 2016-04-28
Author: burton@chartbeat.com
File Name: textacy/corpora/bernie_and_hillary.py
Class Name:
Method Name: fetch_bernie_and_hillary