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 8c05e8d commit 087fafdCopy full SHA for 087fafd
1 file changed
pythainlp/morpheme/word_formation.py
@@ -38,7 +38,8 @@ def nighit(w1: str, w2: str) -> str:
38
newword = []
39
newword.append(list_w1[0])
40
newword.append("ั")
41
- consonants_in_w2 = [i for i in list_w2 if i in set(thai_consonants)]
+ _consonants = set(thai_consonants)
42
+ consonants_in_w2 = [i for i in list_w2 if i in _consonants]
43
if not consonants_in_w2:
44
raise ValueError(
45
f"w2 {w2!r} contains no Thai consonants."
0 commit comments