Skip to content

Commit 90c446e

Browse files
authored
Merge pull request #798 from kangkengkhadev/dev
fixed bug
2 parents a116136 + f906d15 commit 90c446e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pythainlp/khavee/core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,12 @@ def check_sara(self, word: str)-> str:
184184
sara.append('ออ')
185185

186186
# incase บ่
187-
if 'บ่' in word:
187+
if 'บ่' == word:
188188
sara = []
189189
sara.append('ออ')
190-
190+
if 'ํ' in word:
191+
sara = []
192+
sara.append('อำ')
191193
if sara == []:
192194
return 'Cant find Sara in this word'
193195
else:

pythainlp/khavee/example.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
# True
1717

1818
# การตรวจสอบคำสำผัสที่ผิด
19-
print('สรร ขวาน',kv.is_sumpus('สรร','ขวาน'))
19+
print('นํ้า กา',kv.is_sumpus('นํ้า','กา'))
2020
# False
2121

2222
# การตรวจสอบคำ ครุ ลหุ
2323
print('สรร',kv.check_karu_lahu('สรร'))
2424
#karu
25+
2526
# การตรวจสอบคำ ครุ ลหุ
2627
print('ชิชะ',kv.check_karu_lahu('ชิชะ'))
2728
# lahu

0 commit comments

Comments
 (0)