Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ImportError pycrfsuite #901

Closed
wannaphong opened this issue Feb 10, 2024 · 2 comments
Closed

bug: ImportError pycrfsuite #901

wannaphong opened this issue Feb 10, 2024 · 2 comments
Labels
bug bugs in the library
Milestone

Comments

@wannaphong
Copy link
Member

wannaphong commented Feb 10, 2024

Description

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!

Expected results

Doesn't has ImportError

Current results

Can't use PyThaiNLP without install python-crfsuite

Steps to reproduce

  1. Install pythainlp by: pip install pythainlp==5.0.0
  2. use 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

all_thai_words_dict = [
use syllable_tokenize that shouldn't use by default, so I will move all_thai_words_dict to rhyme.

Files

No response

@wannaphong wannaphong added this to the 5.0 milestone Feb 10, 2024
@wannaphong wannaphong added the bug bugs in the library label Feb 10, 2024
wannaphong added a commit that referenced this issue Feb 10, 2024
@wannaphong
Copy link
Member Author

Fixed!

@luc-vocab
Copy link

Many thanks for this prompt solution and for running this excellent project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs in the library
Projects
None yet
Development

No branches or pull requests

2 participants