Skip to content

Commit b348dbc

Browse files
committed
fix docs
1 parent dc62812 commit b348dbc

File tree

1 file changed

+1
-115
lines changed

1 file changed

+1
-115
lines changed

README.md

Lines changed: 1 addition & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -7,88 +7,7 @@
77

88
Homepages :[https://sites.google.com/view/pythainlp/home](https://sites.google.com/view/pythainlp/home)
99

10-
# English
11-
12-
Thai NLP in python package.
13-
14-
Thai Natural language processing in Python language.
15-
16-
Supports Python 2.7 and Python 3.4 +
17-
18-
- Document : [https://sites.google.com/view/pythainlp/home](https://sites.google.com/view/pythainlp/home)
19-
- GitHub Home : [https://github.com/wannaphongcom/pythainlp](https://github.com/wannaphongcom/pythainlp)
20-
21-
### Project status
22-
23-
Developing
24-
25-
### Version
26-
1.3
27-
28-
### Capabilities
29-
- Thai Segment
30-
- Thai to Latin
31-
- Thai Postaggers
32-
- Thai Sentiment
33-
- Read a number to text in Thai language
34-
- Sort the words of a sentence
35-
- Fix the printer forgot to change the language
36-
- Check the wrong words in Thai language
37-
- And more.
38-
39-
# Install
40-
41-
Supports Python 2.7 and Python 3.4 +
42-
43-
Stable version
44-
45-
```sh
46-
$ pip install pythainlp
47-
```
48-
49-
50-
# Document
51-
52-
Sample usage
53-
54-
```python
55-
# Thai Segment
56-
from pythainlp.tokenize import word_tokenize
57-
a = 'ฉันรักภาษาไทยเพราะฉันเป็นคนไทย'
58-
b = word_tokenize(a)
59-
print(b) # ['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คนไทย']
60-
# Thai Postaggers
61-
from pythainlp.postaggers import tag
62-
print(tag('คุณกำลังประชุม')) # [('คุณ', 'PPRS'), ('กำลัง', 'XVBM'), ('ประชุม', 'VACT')]
63-
# Find the number word of the most
64-
from pythainlp.rank import rank
65-
aa = rank(b)
66-
print(aa) # Counter({'ฉัน': 2, 'ไทย': 2, 'เป็น': 1, 'รัก': 1, 'ภาษา': 1, 'เพราะ': 1, 'คน': 1})
67-
# Thai to Latin
68-
from pythainlp.romanization import romanization
69-
b=romanization("แมว")
70-
print(b) # mæw
71-
# Fix the printer forgot to change the language
72-
from pythainlp.change import *
73-
a="l;ylfu8iy["
74-
a=texttothai(a)
75-
b="นามรสนอำันี"
76-
b=texttoeng(b)
77-
print(a) # สวัสดีครับ
78-
print(b) # ok,iloveyou
79-
# Read a number to text in Thai language
80-
from pythainlp.number import numtowords
81-
print("5611116.50")
82-
print(numtowords(5611116.50)) # ห้าล้านหกแสนหนึ่งหมื่นหนึ่งพันหนึ่งร้อยสิบหกบาทห้าสิบสตางค์
83-
```
84-
85-
### License
86-
87-
Apache Software License 2.0
88-
89-
# Thai
90-
91-
Thai NLP in python package.
10+
ประมวลภาษาธรรมชาติภาษาไทยในภาษา Python
9211

9312
Natural language processing หรือ การประมวลภาษาธรรมชาติ โมดูล PyThaiNLP เป็นโมดูลที่ถูกพัฒนาขึ้นเพื่องานวิจัยและพัฒนาการประมวลภาษาธรรมชาติภาษาไทยในภาษา Python
9413

@@ -138,39 +57,6 @@ $ CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip i
13857

13958
# เอกสารการใช้งานเบื้องต้น
14059

141-
ตัวอย่างการใช้งาน
142-
143-
```python
144-
# ตัดคำ
145-
from pythainlp.tokenize import word_tokenize
146-
a = 'ฉันรักภาษาไทยเพราะฉันเป็นคนไทย'
147-
b = word_tokenize(a)
148-
print(b) # ['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คนไทย']
149-
# Postaggers ภาษาไทย
150-
from pythainlp.postaggers import tag
151-
print(tag('คุณกำลังประชุม')) # [('คุณ', 'PPRS'), ('กำลัง', 'XVBM'), ('ประชุม', 'VACT')]
152-
# หาคำที่มีจำนวนการใช้งานมากที่สุด
153-
from pythainlp.rank import rank
154-
aa = rank(b)
155-
print(aa) # Counter({'ฉัน': 2, 'ไทย': 2, 'เป็น': 1, 'รัก': 1, 'ภาษา': 1, 'เพราะ': 1, 'คน': 1})
156-
# ถอดเสียงภาษาไทยเป็น Latin
157-
from pythainlp.romanization import romanization
158-
b=romanization("แมว")
159-
print(b) # mæw
160-
# แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา
161-
from pythainlp.change import *
162-
a="l;ylfu8iy["
163-
a=texttothai(a)
164-
b="นามรสนอำันี"
165-
b=texttoeng(b)
166-
print(a) # สวัสดีครับ
167-
print(b) # ok,iloveyou
168-
# เปลี่ยนตัวเลขเป็นตัวอักษรภาษาไทย (เงินบาท)
169-
from pythainlp.number import numtowords
170-
print("5611116.50")
171-
print(numtowords(5611116.50)) # ห้าล้านหกแสนหนึ่งหมื่นหนึ่งพันหนึ่งร้อยสิบหกบาทห้าสิบสตางค์
172-
```
173-
17460
### License
17561

17662
Apache Software License 2.0

0 commit comments

Comments
 (0)