applicable_rules(self,
tokens,
i,
correctTag)
| source code
|
Return a list of the transformational rules that would correct the
i th 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 i th 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 i th token.
- Returns:
list of BrillRule
|