mirror of https://github.com/explosion/spaCy.git
Add new example for training new entity types
This commit is contained in:
parent
4884b2c113
commit
c729d72fc6
|
@ -29,8 +29,8 @@ def train_ner(nlp, train_data, output_dir):
|
||||||
doc = nlp.make_doc(raw_text)
|
doc = nlp.make_doc(raw_text)
|
||||||
nlp.tagger(doc)
|
nlp.tagger(doc)
|
||||||
loss = nlp.entity.update(doc, gold)
|
loss = nlp.entity.update(doc, gold)
|
||||||
|
nlp.end_training()
|
||||||
nlp.save_to_directory(output_dir)
|
nlp.save_to_directory(output_dir)
|
||||||
#nlp.end_training(output_dir)
|
|
||||||
|
|
||||||
|
|
||||||
def main(model_name, output_directory=None):
|
def main(model_name, output_directory=None):
|
||||||
|
|
Loading…
Reference in New Issue