Skip to content

bug: ImportError pycrfsuite #901

@wannaphong

Description

@wannaphong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbugs in the library

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions