Skip to content

Commit 521bc25

Browse files
authored
Fix comment
1 parent ab56fbe commit 521bc25

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

pythainlp/word_vector/core.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,9 @@ def doesnt_match(words: List[str]) -> str:
5050
Pick the word "พริกไทย" (name of food) out of the list of meals
5151
("อาหารเช้า", "อาหารเที่ยง", "อาหารเย็น").
5252
53-
>>> from pythainlp.
54-
55-
56-
57-
58-
59-
60-
61-
tor import doesnt_match
53+
>>> from pythainlp.word_vector import doesnt_match
6254
>>>
63-
>>> words = ['อาหารเช้า','อาหารเที่ยง','อาหารเย็น','พริกไทย']
55+
>>> words = ['อาหารเช้า', 'อาหารเที่ยง', 'อาหารเย็น', 'พริกไทย']
6456
>>> doesnt_match(words)
6557
พริกไทย
6658
@@ -196,15 +188,15 @@ def similarity(word1: str, word2: str) -> float:
196188
(train and electric train).
197189
198190
>>> from pythainlp.word_vector import similarity
199-
>>> similarity('รถไฟ','รถไฟฟ้า')
191+
>>> similarity('รถไฟ', 'รถไฟฟ้า')
200192
0.43387136
201193
202194
203195
Compute consine similarity between two words: "เสือดาว" and "รถไฟฟ้า"
204196
(leopard and electric train).
205197
206198
>>> from pythainlp.word_vector import similarity
207-
>>> similarity('เสือดาว','รถไฟฟ้า')
199+
>>> similarity('เสือดาว', 'รถไฟฟ้า')
208200
0.04300258
209201
210202
"""

0 commit comments

Comments
 (0)