applicable_rules(self,
tokens,
index,
correct_tag)
| source code
|
Return a list of the transformational rules that would correct the
ith subtoken's tag in the given token. In particular,
return a list of zero or more rules that would change
tagged_tokens[i][1] to correctTag, if applied
to token.
If the ith subtoken already has the correct tag (i.e., if
tagged_tokens[i][1] == correctTag), then
applicable_rules should return the empty list.
- Parameters:
tokens - The tagged tokens being tagged.
i - The index of the token whose tag should be corrected.
correctTag - The correct tag for the ith token.
- Returns:
list of BrillRule
- Overrides:
BrillTemplateI.applicable_rules
- (inherited documentation)
|