Closed wannaphong closed 7 months ago
After installed PyThaiNLP 5.0.0, It has error when call any function.
try: import pycrfsuite except ImportError: raise ImportError("ImportError; Install pycrfsuite by pip install python-crfsuite")
Thank you @luc-languagetools for report the bug!
Doesn't has ImportError
Can't use PyThaiNLP without install python-crfsuite
from pythainlp.tokenize import word_tokenize
5.0.0
3.9.0
MacOS 12
No response
Delete a code that use any python-crfsuite.
I found https://github.com/PyThaiNLP/pythainlp/blob/1e94d32f387ea26021a4d79d8781322de944959c/pythainlp/util/pronounce.py#L12 use syllable_tokenize that shouldn't use by default, so I will move all_thai_words_dict to rhyme.
syllable_tokenize
all_thai_words_dict
rhyme
Fixed!
Many thanks for this prompt solution and for running this excellent project!
Description
After installed PyThaiNLP 5.0.0, It has error when call any function.
Thank you @luc-languagetools for report the bug!
Expected results
Doesn't has ImportError
Current results
Can't use PyThaiNLP without install python-crfsuite
Steps to reproduce
from pythainlp.tokenize import word_tokenize
PyThaiNLP version
5.0.0
Python version
3.9.0
Operating system and version
MacOS 12
More info
No response
Possible solution
Delete a code that use any python-crfsuite.
I found https://github.com/PyThaiNLP/pythainlp/blob/1e94d32f387ea26021a4d79d8781322de944959c/pythainlp/util/pronounce.py#L12 use
syllable_tokenize
that shouldn't use by default, so I will moveall_thai_words_dict
torhyme
.Files
No response