Tagger

Annotate part-of-speech tags on Doc objects.

Tagger.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.
returnTaggerThe newly constructed object.

Tagger.__init__

Create a Tagger.

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

Tagger.__call__

Apply the tagger, setting the POS tags onto the Doc object.

NameTypeDescription
docDocThe tokens to be tagged.
returnNone-

Tagger.pipe

Tag a stream of documents.

NameTypeDescription
stream-The sequence of documents to tag.
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.

Tagger.update

Update the statistical model, with tags supplied for the given document.

NameTypeDescription
docDocThe example document for the update.
goldGoldParseManager for the gold-standard tags.
returnintNumber of tags predicted correctly.