We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ddeb04 commit 1cd22baCopy full SHA for 1cd22ba
pythainlp/util/pronounce.py
@@ -20,10 +20,12 @@
20
21
22
kv = KhaveeVerifier()
23
-all_thai_words_dict = [i for i in list(thai_words()) if len(syllable_tokenize(i))==1]
+all_thai_words_dict = [
24
+ i for i in list(thai_words()) if len(syllable_tokenize(i)) == 1
25
+]
26
27
-def rhyme(word: str)->List[str]:
28
+def rhyme(word: str) -> List[str]:
29
"""
30
Find Thai rhyme
31
@@ -38,8 +40,8 @@ def rhyme(word: str)->List[str]:
38
40
print(rhyme("จีบ"))
39
41
# output: ['กลีบ', 'กีบ', 'ครีบ', ...]
42
- list_sumpus=[]
43
+ list_sumpus = []
44
for i in all_thai_words_dict:
- if kv.is_sumpus(word,i) and i!=word:
45
+ if kv.is_sumpus(word, i) and i != word:
46
list_sumpus.append(i)
47
return sorted(list_sumpus)
0 commit comments