Tagger

Annotate part-of-speech tags on Doc objects.

Tagger.__init__

Create a Tagger.

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

Tagger.__call__

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

NameTypeDescription
docDocThe tokens to be tagged.
returnsNone-

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.
yieldsDocDocuments, 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.
returnsintNumber of tags predicted correctly.