

def __init__(self, left_tag_pattern, right_tag_pattern, descr):
    "\n        Construct a new ``ExpandRightRule``.\n\n        :type right_tag_pattern: str\n        :param right_tag_pattern: This rule's right tag\n            pattern.  When applied to a ``ChunkString``, this\n            rule will find any chunk whose beginning matches\n            ``right_tag_pattern``, and immediately preceded by a chink\n            whose end matches this pattern.  It will\n            then merge those two chunks into a single chunk.\n        :type left_tag_pattern: str\n        :param left_tag_pattern: This rule's left tag\n            pattern.  When applied to a ``ChunkString``, this\n            rule will find any chunk whose beginning matches\n            this pattern, and immediately preceded by a chink\n            whose end matches ``left_tag_pattern``.  It will\n            then expand the chunk to incorporate the new material on the left.\n\n        :type descr: str\n        :param descr: A short description of the purpose and/or effect\n            of this rule.\n        "
    re.compile(tag_pattern2re_pattern(left_tag_pattern))
    re.compile(tag_pattern2re_pattern(right_tag_pattern))
    self._left_tag_pattern = left_tag_pattern
    self._right_tag_pattern = right_tag_pattern
    regexp = re.compile(('(?P<left>%s)\\{(?P<right>%s)' % (tag_pattern2re_pattern(left_tag_pattern), tag_pattern2re_pattern(right_tag_pattern))))
    RegexpChunkRule.__init__(self, regexp, '{\\g<left>\\g<right>', descr)

dataset/ETHPy150Open nltk/nltk/nltk/chunk/regexp.py ExpandLeftRule.__init__/original