BrillTagger is a transformation-based tagger. It is the first tagger that is not a subclass of
SequentialBackoffTagger. Instead, the
BrillTagger uses a series of rules to correct the results of an initial tagger. These rules are scored based on how many errors they correct minus the number of new errors they produce.
Here's a function from
tag_util.py that trains a
FastBrillTaggerTrainer. It requires an
from nltk.tag import brill def train_brill_tagger(initial_tagger, train_sents, **kwargs): sym_bounds = [(1,1), (2,2), (1,2), (1,3)] asym_bounds = [(-1,-1), (1,1)] templates = [ brill.SymmetricProximateTokensTemplate(brill.ProximateTagsRule, *sym_bounds), ...