A conditional random field (CRF) assigns labels to related observations while using dependencies between them. In named entity recognition, context from words before and after an entity helps distinguish boundaries and types, such as whether “Washington” denotes a person, location, organization, or sports team. section 11.4.2
CRFs work here as the final technique combined with bidirectional LSTMs in spaCy’s NER module. The surrounding pipeline also relies on part-of-speech tagging and dependency parsing to identify entities and their relationships for knowledge graphs. section 11.4.2
Inspecting spaCy entities
Run spaCy on text and inspect the resulting document’s ents attribute to retrieve recognized entities, without implementing the neural network or CRF yourself. section 11.4.2
