EntityRecognizer

Annotate named entities on Doc objects.

EntityRecognizer.__init__

Create an EntityRecognizer.

NameTypeDescription
vocabVocabThe vocabulary. Must be shared with documents to be processed.
modelThe statistical model.
returnsEntityRecognizerThe newly constructed object.

EntityRecognizer.__call__

Apply the entity recognizer, setting the NER tags onto the Doc object.

NameTypeDescription
docDocThe document to be processed.
returnsNone-

EntityRecognizer.pipe

Process a stream of documents.

NameTypeDescription
stream-The sequence of documents to process.
batch_sizeintThe number of documents to accumulate into a working set.
n_threadsint The number of threads with which to work on the buffer in parallel.
yieldsDocDocuments, in order.

EntityRecognizer.update

Update the statistical model.

NameTypeDescription
docDocThe example document for the update.
goldGoldParseThe gold-standard annotations, to calculate the loss.
returnsintThe loss on this example.

EntityRecognizer.step_through

Set up a stepwise state, to introspect and control the transition sequence.

NameTypeDescription
docDocThe document to step through.
returnsStepwiseStateA state object, to step through the annotation process.