

def __init__(self, regexp, repl, descr):
    '\n        Construct a new RegexpChunkRule.\n\n        :type regexp: regexp or str\n        :param regexp: The regular expression for this ``RegexpChunkRule``.\n            When this rule is applied to a ``ChunkString``, any\n            substring that matches ``regexp`` will be replaced using\n            the replacement string ``repl``.  Note that this must be a\n            normal regular expression, not a tag pattern.\n        :type repl: str\n        :param repl: The replacement expression for this ``RegexpChunkRule``.\n            When this rule is applied to a ``ChunkString``, any substring\n            that matches ``regexp`` will be replaced using ``repl``.\n        :type descr: str\n        :param descr: A short description of the purpose and/or effect\n            of this rule.\n        '
    if isinstance(regexp, string_types):
        regexp = re.compile(regexp)
    self._repl = repl
    self._descr = descr
    self._regexp = regexp

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