EntityRecognizer

Annotate named entities on Doc objects.

EntityRecognizer.load

Load the statistical model from the supplied path.

NameTypeDescription
pathPathThe path to load from.
vocabVocabThe vocabulary. Must be shared by the documents to be processed.
requireboolWhether to raise an error if the files are not found.
returnEntityRecognizerThe newly constructed object.

EntityRecognizer.__init__

Create an EntityRecognizer.

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

EntityRecognizer.__call__

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

NameTypeDescription
docDocThe document to be processed.
returnNone-

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.
yieldDocDocuments, in order.

EntityRecognizer.update

Update the statistical model.

NameTypeDescription
docDocThe example document for the update.
goldGoldParseThe gold-standard annotations, to calculate the loss.
returnintThe 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.
returnStepwiseStateA state object, to step through the annotation process.