applicable_rules(self,
tokens,
i,
correctTag)
| 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 (list of tuple) - The tagged tokens being tagged.
i (int) - The index of the token whose tag should be corrected.
correctTag ((any)) - The correct tag for the ith token.
- Returns:
list of BrillRule
|