//for i in range(len(gold.ner)):
//if not gold.ner[i].endswith("ANIMAL"):
// gold.ner[i] = "-"
doc = nlp.make_doc(raw_text)
nlp.tagger(doc)
// As of 1.9, spaCy"s parser now lets you supply a dropout probability
// This might help the model generalize better from only a few
// examples.
loss += nlp.entity.update(doc, gold, drop=0.9)
if loss == 0:
break
// This step averages the model"s weights. This may or may not be good for
// your situation --- it"s empirical.