Commit cbb5bdcd authored by Aleksandr Tkachenko's avatar Aleksandr Tkachenko
Browse files

Update ner.rst

parent c66fd239
......@@ -122,8 +122,29 @@ Tokens with named entity labels::
Training custom models
======================
Default models that come with Estnltk are good enough for basic tasks.
However, for more serious tasks, a custom NER model is crucial to guarantee better accuracy.
::
from estnltk.corpus import read_json_corpus
from estnltk.ner import NerTrainer
# Read the corpus
ds = read_json_corpus('projects/estnltk/estnltk/corpora/estner.json')
# Read ner settings and initialize the trainer
trainer = NerTrainer(estnltk.estner.settings)
trainer.train(ds, '<output directory>')
Evaluation
==========
asdf
Serialization
=============
... content ...
asdf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment