Skip to content

perception/orchid_ud pos tagger model still require nltk to load #468

@bact

Description

@bact

Looks like the pickle of perceptron/orchid_ud tagger still need nltk.

Does this correct?

>>> from pythainlp.tag.named_entity import ThaiNameTagger
>>> ner = ThaiNameTagger()
>>> ner.get_ner("ปัตตานียะลาถึงนราธิวาส")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/pythainlp/pythainlp/tag/named_entity.py", line 138, in get_ner
    pos_tags = pos_tag(tokens, engine="perceptron", corpus="orchid_ud")
  File "/pythainlp/pythainlp/tag/pos_tag.py", line 221, in pos_tag
    from .perceptron import tag as tag_
  File "/pythainlp/pythainlp/tag/perceptron.py", line 28, in <module>
    _ORCHID_TAGGER = _load_tagger(_ORCHID_DATA_FILENAME)
  File "/pythainlp/pythainlp/tag/perceptron.py", line 24, in _load_tagger
    model = pickle.load(fh)
ModuleNotFoundError: No module named 'nltk'
>>>

Metadata

Metadata

Assignees

Labels

bugbugs in the library

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions