nltk.tag.BrillTagger.print_template_statistics

BrillTagger.print_template_statistics(test_stats=None, printunused=True)[source]

Print a list of all templates, ranked according to efficiency.

If test_stats is available, the templates are ranked according to their relative contribution (summed for all rules created from a given template, weighted by score) to the performance on the test set. If no test_stats, then statistics collected during training are used instead. There is also an unweighted measure (just counting the rules). This is less informative, though, as many low-score rules will appear towards end of training.

Parameters:
  • test_stats (dict of str -> any (but usually numbers)) – dictionary of statistics collected during testing
  • printunused (bool) – if True, print a list of all unused templates
Returns:

None

Return type:

None