Skip to content

Commit 8c05e8d

Browse files
bactCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e8ba54a commit 8c05e8d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pythainlp/khavee/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ def check_sara(self, word: str) -> str:
6060
# In case of การันย์
6161
if "์" in word[-1]:
6262
word = word[:-2]
63+
# After removing the karun, the word may become empty (e.g. "ก์")
64+
if not word:
65+
return ""
6366

6467
# In case of สระเดี่ยว
6568
for i in word:

0 commit comments

Comments
 (0)