We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4ab08f commit b3444e0Copy full SHA for b3444e0
pythainlp/corpus/thaipos.py
@@ -10,6 +10,6 @@
10
11
12
def get_data():
13
- with open(TEMPLATE_FILE, encoding="utf8") as f:
+ with open(TEMPLATE_FILE, encoding="utf-8-sig") as f:
14
model = json.load(f)
15
return model
pythainlp/tag/old.py
@@ -8,15 +8,13 @@
8
import dill
9
import nltk.tag
import pythainlp
+from pythainlp.corpus.thaipos import get_data
TEMPLATES_DIR = os.path.join(os.path.dirname(pythainlp.__file__), "corpus")
16
def orchid_data():
- template_file = os.path.join(TEMPLATES_DIR, "thaipos.json")
17
- with open(template_file, "r", encoding="utf-8-sig") as handle:
18
- model = json.load(handle)
19
- return model
+ return get_data()
20
21
22
def pud_data():
pythainlp/tokenize/thai.py
0 commit comments