nltk.tag.BrillTagger
¶
-
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 theTagRule
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.
Methods¶
__init__ (initial_tagger, rules[, training_stats]) |
|
||||
batch_tag_incremental (sequences, gold) |
Tags by applying each rule to the entire corpus (rather than all rules to a single sequence). | ||||
decode_json_obj (obj) |
|||||
encode_json_obj () |
|||||
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 (tokens) |
|||||
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 |