Skip to content

Commit e2c3390

Browse files
committed
Clean tnc_freq.txt
1 parent 1f56415 commit e2c3390

File tree

3 files changed

+88
-25507
lines changed

3 files changed

+88
-25507
lines changed

pythainlp/corpus/tnc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ def word_freq(word: str, domain: str = "all") -> int:
2323
This function will make a query to the server of Thai National Corpus.
2424
Internet connection is required.
2525
26-
**IMPORTANT:** Currently (as of 29 April 2019) always return 0,
27-
as the service URL has been changed and the code is not updated yet.
26+
**IMPORTANT:** Currently (as of 29 April 2019) it is likely to return 0,
27+
regardless of the word, as the service URL has been changed and the code
28+
is not updated yet.
29+
New URL is http://www.arts.chula.ac.th/~ling/tnc3/
2830
2931
:param string word: word
3032
:param string domain: domain
@@ -42,8 +44,7 @@ def word_freq(word: str, domain: str = "all") -> int:
4244
"leisure": "9",
4345
"others": "0",
4446
}
45-
url = "http://www.arts.chula.ac.th/~ling/TNCII/corp.php"
46-
# New URL is http://www.arts.chula.ac.th/~ling/tnc3/
47+
url = "http://www.arts.chula.ac.th/~ling/tnc3/"
4748
data = {"genre[]": "", "domain[]": listdomain[domain], "sortby": "perc", "p": word}
4849

4950
r = requests.post(url, data=data)

0 commit comments

Comments
 (0)