class nltk.tag.BrillTagger(initial_tagger, rules, training_stats=None)[source]

Brill’s transformational rule-based tagger. Brill taggers use an initial tagger (such as tag.DefaultTagger) to assign an initial tag sequence to a text; and then apply an ordered list of transformational rules to correct the tags of individual tokens. These transformation rules are specified by the TagRule interface.

Brill taggers can be created directly, from an initial tagger and a list of transformational rules; but more often, Brill taggers are created by learning rules from a training corpus, using one of the TaggerTrainers available.


__init__(initial_tagger, rules[, training_stats])
param initial_tagger:
 The initial tagger
batch_tag_incremental(sequences, gold) Tags by applying each rule to the entire corpus (rather than all rules to a single sequence).
evaluate(gold) Score the accuracy of the tagger against the gold standard.
print_template_statistics([test_stats, ...]) Print a list of all templates, ranked according to efficiency.
rules() Return the ordered list of transformation rules that this tagger has learnt
tag_sents(sentences) Apply self.tag() to each element of sentences.
train_stats([statistic]) Return a named statistic collected during training, or a dictionary of all