Skip to content

Commit 57b1be1

Browse files
committed
pythainlp 0.0.5
pythainlp 0.0.5
1 parent 6abcc3e commit 57b1be1

File tree

5 files changed

+6
-63
lines changed

5 files changed

+6
-63
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ Natural language processing หรือ การประมวลภาษา
99
รองรับเฉพาะ Python 3 เท่านั้น (Python 2 กำลังพัฒนา)
1010

1111
### Version
12-
0.0.4
12+
0.0.5
1313

1414
### มีอะไรใหม่
15-
แก้ไข bug import ใน python บางรุ่น
16-
ใช้ PyICU ตัดคำเป็นค่าเริ่มต้น
15+
ปรับปรุงประสิทธิภาพ ย้ายโค้ดบางส่วนไปใช้ NLTK
1716

1817
### ความสามารถ
1918
- ตัดคำภาษาไทย

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Thai NLP in python package.
2020

2121
Version
2222
--------
23-
0.0.4
23+
0.0.5
2424

2525
* Free software: Apache Software License 2.0
2626
* Documentation: https://pythainlp.readthedocs.io.

docs/usage.rst

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,4 @@ Usage
44

55
To use PyThai-NLP in a project::
66

7-
import pythainlp
8-
9-
# ตัดคำ
10-
11-
from pythainlp.segment import segment
12-
13-
a = 'ฉันรักภาษาไทยเพราะฉันเป็นคนไทย'
14-
15-
b = segment(a)
16-
17-
print(b) # ['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คนไทย']
18-
19-
# Postaggers ภาษาไทย
20-
21-
from pythainlp.postaggers import tag
22-
23-
print(tag('คุณกำลังประชุม')) #ค ุณ/PPRS กำลัง/XVBM ประชุม/VACT
24-
25-
# หาคำที่มีจำนวนการใช้งานมากที่สุด
26-
27-
from pythainlp.rank import rank
28-
29-
aa = rank(b)
30-
31-
print(aa) # Counter({'ฉัน': 2, 'ไทย': 2, 'เป็น': 1, 'รัก': 1, 'ภาษา': 1, 'เพราะ': 1, 'คน': 1})
32-
33-
# ทับศัพท์เสียงไทยในภาษาอังกฤษ (ยังไม่รองรับเสียงสระ)
34-
35-
from pythainlp.romanization import romanization
36-
37-
b=romanization("ต้นกก")
38-
39-
print(b) # tonkok
40-
41-
# แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา
42-
43-
from pythainlp.change import *
44-
45-
a="l;ylfu8iy["
46-
47-
a=texttothai(a)
48-
49-
b="นามรสนอำันี"
50-
51-
b=texttoeng(b)
52-
53-
print(a) # สวัสดีครับ
54-
55-
print(b) # ok,iloveyou
56-
57-
# เปลี่ยนตัวเลขเป็นตัวอักษรภาษาไทย (เงินบาท)
58-
59-
from pythainlp.number import numtowords
60-
61-
print("5611116.50")
62-
63-
print(numtowords(5611116.50)) # ห้าล้านหกแสนหนึ่งหมื่นหนึ่งพันหนึ่งร้อยสิบหกบาทห้าสิบสตางค์
7+
import pythainlp

pythainlp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from __future__ import absolute_import
33
__author__ = 'Wannaphong Phatthiyaphaibun'
44
__email__ = '[email protected]'
5-
__version__ = '0.0.4'
5+
__version__ = '0.0.5'
66
from . import romanization
77
from . import segment
88
from . import rank

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
setup(
2424
name='pythainlp',
25-
version='0.0.4',
25+
version='0.0.5',
2626
description="Thai NLP in python package.",
2727
long_description=readme,# + '\n\n' + history,
2828
author="Wannaphong Phatthiyaphaibun",

0 commit comments

Comments
 (0)