

def _trace_apply(self, chunkstr, verbose):
    '\n        Apply each rule of this ``RegexpChunkParser`` to ``chunkstr``, in\n        turn.  Generate trace output between each rule.  If ``verbose``\n        is true, then generate verbose output.\n\n        :type chunkstr: ChunkString\n        :param chunkstr: The chunk string to which each rule should be\n            applied.\n        :type verbose: bool\n        :param verbose: Whether output should be verbose.\n        :rtype: None\n        '
    print('# Input:')
    print(chunkstr)
    for rule in self._rules:
        rule.apply(chunkstr)
        if verbose:
            print('#', (((rule.descr() + ' (') + unicode_repr(rule)) + '):'))
        else:
            print('#', (rule.descr() + ':'))
        print(chunkstr)

dataset/ETHPy150Open nltk/nltk/nltk/chunk/regexp.py RegexpChunkParser._trace_apply/original