Skip to content

Commit dc62812

Browse files
committed
fix docs
1 parent b55caab commit dc62812

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

docs/pythainlp-1-3-thai.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,29 +103,29 @@ print(collation(['ไก่','ไข่','ก','ฮา'])) # ['ก', 'ไก่'
103103

104104
### รับเวลาปัจจุบันเป็นภาษาไทย
105105

106-
```
106+
```python
107107
from pythainlp.date import now
108108
now() # '30 พฤษภาคม 2560 18:45:24'
109109
```
110110
### WordNet ภาษาไทย
111111

112112
เรียกใช้งาน
113113

114-
```
114+
```python
115115
from pythainlp.corpus import wordnet
116116
```
117117

118118
**รับ Synset**
119119

120-
```
120+
```python
121121
wordnet.getSynset(คำ)
122122
```
123123

124124
เป็นคำสั่ง ใช้รับ Synset รับค่า str ส่งออกเป็น tuple ('Synset', 'synset li')
125125

126126
**รับคำจาก id**
127127

128-
```
128+
```python
129129
wordnet.getWords()
130130
```
131131

@@ -140,23 +140,24 @@ stopwords = stopwords.words('thai')
140140

141141
### หาคำที่มีจำนวนการใช้งานมากที่สุด
142142

143-
```
144-
pythainlp.rank.rank(list)
143+
```python
144+
from pythainlp.rank import rank
145+
rank(list)
145146
```
146147

147148
คืนค่าออกมาเป็น dict
148149

149150
**ตัวอย่างการใช้งาน**
150151

151-
```
152-
>>> pythainlp.rank.rank(['แมง','แมง','คน'])
152+
```python
153+
>>> rank(['แมง','แมง','คน'])
153154
Counter({'แมง': 2, 'คน': 1})
154155
```
155156

156157
### แก้ไขปัญหาการพิมพ์ลืมเปลี่ยนภาษา
157158

158-
```
159-
pythainlp.change.คำสั่ง()
159+
```python
160+
from pythainlp.change import *
160161
```
161162

162163
มีคำสั่งดังนี้

0 commit comments

Comments
 (0)