Skip to content

Commit

Permalink
Change the default NER to thainer-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wannaphong committed Jun 21, 2023
1 parent 61c6b8e commit 5e97e7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pythainlp/tag/named_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ class NER:
:param str corpus: corpus
**Options for engine**
* *thainer-v2* - Thai NER engine v2.0 for Thai NER 2.0 (default)
* *thainer* - Thai NER engine
* *tltk* - wrapper for `TLTK <https://pypi.org/project/tltk/>`_.
* *thainer-v2* - Thai NER engine v2.0 for Thai NER 2.0
**Options for corpus**
* *thainer* - Thai NER corpus
* *thainer* - Thai NER corpus (default)
**Note**: for tltk engine, It's support ner model from tltk only.
"""

def __init__(self, engine: str, corpus: str = "thainer") -> None:
def __init__(self, engine: str = "thainer-v2", corpus: str = "thainer") -> None:
self.load_engine(engine=engine, corpus=corpus)

def load_engine(self, engine: str, corpus: str) -> None:
Expand Down
1 change: 0 additions & 1 deletion pythainlp/tag/thainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from pythainlp.tokenize import word_tokenize
from pythainlp.util import isthai

_CORPUS_NAME = "thainer"
_TOKENIZER_ENGINE = "newmm" # should be the same as one used in training data


Expand Down

0 comments on commit 5e97e7c

Please sign in to comment.