Skip to content

Commit b75cf8f

Browse files
committed
updata code
1 parent 6771cac commit b75cf8f

File tree

12 files changed

+14
-5
lines changed

12 files changed

+14
-5
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ env:
1010
- TOXENV=py33
1111
- TOXENV=py27
1212
- TOXENV=pypy
13-
- TOXENV=pypy3
1413
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
1514
install: pip install -U tox
1615

pythainlp/change/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from __future__ import absolute_import,print_function
23
from nine import str,iteritems
34
dictdata={'Z':'(','z':'ผ','X':')','x':'ป','C':'ฉ','c':'แ','V':'ฮ','v':'อ','B':'ฺ','b':'ิ','N':'์','n':'ื','M':'?','m':'ท','<':'ฒ',',':'ม','>':'ฬ','.':'ใ','?':'ฦ','/':'ฝ',

pythainlp/collation/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from __future__ import absolute_import,print_function
23
import icu
34
collator1 = icu.Collator.createInstance(icu.Locale('th_TH'))

pythainlp/corpus/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from __future__ import absolute_import
23
from __future__ import print_function
34
from .thaipos import get_data

pythainlp/corpus/thaipos.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
# -*- coding: utf-8 -*-
12
import pythainlp
23
import os
34
from nine import nimport,str
45
json= nimport('json')
6+
codecs= nimport('codecs')
7+
reader = codecs.getreader("utf-8")
58
templates_dir = os.path.join(os.path.dirname(pythainlp.__file__), 'corpus')
69
template_file = os.path.join(templates_dir, 'thaipos.json')
710
def get_data():
8-
with open(template_file) as f:
9-
model = json.load(f)
10-
return model
11+
return json.load(reader(open(template_file).read()))

pythainlp/corpus/thaiword.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import os
23
from nine import nimport,str
34
codecs= nimport('codecs')

pythainlp/number/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
# ระบบแปลงเลขใน 1- 10 ภาษาไทย
23
from __future__ import absolute_import,division,print_function
34
from nine import str

pythainlp/postaggers/text.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from __future__ import absolute_import,division,print_function
23
from nine import nimport,str
34
from pythainlp.segment import segment

pythainlp/rank/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from __future__ import absolute_import,print_function
23
from future import standard_library
34
standard_library.install_aliases()

pythainlp/romanization/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from __future__ import absolute_import,print_function
23
import icu
34
# ถอดเสียงภาษาไทยเป็น Latin

pythainlp/segment/thai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
import os
23
import codecs
34
import pythainlp

pythainlp/spell/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from __future__ import absolute_import
2-
from .hunspell import spell
2+
from .hunspell import spell

0 commit comments

Comments
 (0)