pythainlp
pythainlp copied to clipboard
Error(wrong result) sentences in dictionary-based tokenizers
Description
When I tested with the easy sentence "Eat rice(กินข้าว)", all dictionary-based tokenizers such as longest and newmm gave wrong results.
I think that "rice(ข้าว)" and "eat(กิน)" should be separated as the correct answer.
Expected results
[กิน, ข้าว]
Current results
[กินข้าว]
Steps to reproduce
tokens = word_tokenize("กินข้าว", engine="longest")
Your environment
- PyThaiNLP version: 3.0.8
- Python version:3.7.3
- Operating system and version (distro, 32/64-bit): 64
กินข้าว is phrase in Thai. It can mean "eat rice" or "meal time". example "ฉัน (I) กิน (eat) ข้าว (rice)" and "ได้(It's) เวลา กินข้าว (meal time)".
กินข้าว phrase: ทานข้าวไม่ได้แปลว่ากินข้าว : การให้ค่า เวลา การตีตราความถูกผิดในสังคมไทย
Related discussion https://github.com/PyThaiNLP/pythainlp/discussions/675
