In the previous chapter on POS-tagging, we discussed in detail the training process of a statistical model used for tagging. The idea for NER-tagging remains the same – we select features we believe are indicative of a named entity tag, plug these features into a machine learning model, feed it annotated data, and let the machine learn from the examples provided.
If you are in the need of a refresher of how the training process happens in a spaCy model, we recommend that you re-read Training our own POS-taggers section from the Chapter 5, POS-Tagging and Its Applications of the book.
We will now examine two code files present in the spaCy examples folder: one which trains a blank model to perform NER-tagging, and another which adds a new entity to an existing model.
The following code appears in the train_ner.py file [12]:
import plac import...