nltk.SequentialBackoffTagger

class nltk.SequentialBackoffTagger(backoff=None)[source]

An abstract base class for taggers that tags words sequentially, left to right. Tagging of individual words is performed by the choose_tag() method, which should be defined by subclasses. If a tagger is unable to determine a tag for the specified token, then its backoff tagger is consulted.

Variables:_taggers – A list of all the taggers that should be tried to tag a token (i.e., self and its backoff taggers).

Methods

__init__([backoff])
choose_tag(tokens, index, history) Decide which tag should be used for the specified token, and return that tag.
evaluate(gold) Score the accuracy of the tagger against the gold standard.
tag(tokens)
tag_one(tokens, index, history) Determine an appropriate tag for the specified token, and return that tag.
tag_sents(sentences) Apply self.tag() to each element of sentences.

Attributes

backoff The backoff tagger for this tagger.