Skip to content

Commit

Permalink
Fixed #914
Browse files Browse the repository at this point in the history
  • Loading branch information
wannaphong committed May 29, 2024
1 parent e034c54 commit 51d3639
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pythainlp/util/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,12 @@ def maiyamok(sent: Union[str, List[str]]) -> List[str]:
if "ๆ" == text:
text = _list_word[i - 1]
elif "ๆ" in text:
text = text.replace("ๆ", "")
_list_word.append(text)
count = text.count("ๆ")
text = _list_word[i - 1]
for _ in range(count):
_list_word.append(text)
i += 1
continue
_list_word.append(text)
i += 1
return _list_word

0 comments on commit 51d3639

Please sign in to comment.