Home | Trees | Indices | Help |
|
---|
|
object --+ | FastBrillTaggerTrainer
A faster trainer for brill taggers.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
_tag_positions Mapping from tags to lists of positions that use that tag. |
|||
_rules_by_position Mapping from positions to the set of rules that are known to occur at that position. |
|||
_positions_by_rule Mapping from rule to position to effect, specifying the effect that each rule has on the overall score, at each position. |
|||
_rules_by_score Mapping from scores to the set of rules whose effect on the overall score is upper bounded by that score. |
|||
_rule_scores Mapping from rules to upper bounds on their effects on the overall score. |
|||
_first_unknown_position Mapping from rules to the first position where we're unsure if the rule applies. |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Initialize the tag position mapping & the rule related mappings. For each error in test_sents, find new rules that would correct them, and add them to the rule mappings. |
Find the next best rule. This is done by repeatedly taking a rule with the highest score and stepping through the corpus to see where it applies. When it makes an error (decreasing its score) it's bumped down, and we try a new rule with the highest score. When we find a rule which has the highest score AND which has been tested against the entire corpus, we can conclude that it's the next best rule. |
|
_rules_by_positionMapping from positions to the set of rules that are known to occur at that position. Position is (sentnum, wordnum). Initially, this will only contain positions where each rule applies in a helpful way; but when we examine a rule, we'll extend this list to also include positions where each rule applies in a harmful or neutral way. |
_positions_by_ruleMapping from rule to position to effect, specifying the effect that each rule has on the overall score, at each position. Position is (sentnum, wordnum); and effect is -1, 0, or 1. As with _rules_by_position, this mapping starts out only containing rules with positive effects; but when we examine a rule, we'll extend this mapping to include the positions where the rule is harmful or neutral. |
_rules_by_scoreMapping from scores to the set of rules whose effect on the overall score is upper bounded by that score. Invariant: rulesByScore[s] will contain r iff the sum of _positions_by_rule[r] is s. |
_rule_scoresMapping from rules to upper bounds on their effects on the overall score. This is the inverse mapping to _rules_by_score. Invariant: ruleScores[r] = sum(_positions_by_rule[r]) |
_first_unknown_positionMapping from rules to the first position where we're unsure if the rule applies. This records the next position we need to check to see if the rule messed anything up. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:57 2008 | http://epydoc.sourceforge.net |