Public Functions
__init__(self, rule, chunk)
Initialize the rule, with name, left-hand side and right-hand side, and add
the chunk it will apply to.
__str__(self)
match(self)
Match the rule to the chunk. Return the right-hand side of the rule if it was
succesfull and return False otherwise.
Private Functions
_checkItem(self, chunk_element, ruleInfo)
Check whether the chunk element matches the rule.
_matchPos(self, ruleInfo, i)
Match the rule info to the pos of the token at index i. If there
is no ruleInfo, then consider the rule matched.
_matchWord(self, ruleInfo, i)
Match the rule info to the string of the token at index i. If there
is no ruleInfo, then consider the rule matched.