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.
2 parents 9a2c157 + 1f0feaa commit a345f9eCopy full SHA for a345f9e
pythainlp/util/syllable.py
@@ -21,7 +21,7 @@
21
"กบ": list("บปภพฟ"),
22
}
23
24
-thai_consonants_all = list(thai_consonants)
+thai_consonants_all = set(thai_consonants)
25
thai_consonants_all.remove("อ")
26
27
_temp = list("".join(["".join(v) for v in spelling_class.values()]))
@@ -87,7 +87,7 @@ def sound_syllable(syllable: str) -> str:
87
return "dead"
88
89
# get consonants
90
- consonants = [i for i in syllable if i in list(thai_consonants_all)]
+ consonants = [i for i in syllable if i in thai_consonants_all]
91
if (
92
(len(consonants) == 0)
93
and ("อ" in syllable)
0 commit comments