Skip to content

Commit b3444e0

Browse files
committed
Delete pythainlp.tokenize.thai and Update pythainlp.corpus.thaipos
1 parent f4ab08f commit b3444e0

File tree

3 files changed

+3
-32
lines changed

3 files changed

+3
-32
lines changed

pythainlp/corpus/thaipos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111

1212
def get_data():
13-
with open(TEMPLATE_FILE, encoding="utf8") as f:
13+
with open(TEMPLATE_FILE, encoding="utf-8-sig") as f:
1414
model = json.load(f)
1515
return model

pythainlp/tag/old.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
import dill
99
import nltk.tag
1010
import pythainlp
11+
from pythainlp.corpus.thaipos import get_data
1112

1213
TEMPLATES_DIR = os.path.join(os.path.dirname(pythainlp.__file__), "corpus")
1314

1415

1516
def orchid_data():
16-
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
17+
return get_data()
2018

2119

2220
def pud_data():

pythainlp/tokenize/thai.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)