

def _tag(self, tok):
    if isinstance(tok, tuple):
        return tok[1]
    elif isinstance(self, Tree):
        return tok.label()
    else:
        raise ValueError('chunk structures must contain tagged tokens or trees')

dataset/ETHPy150Open nltk/nltk/nltk/chunk/regexp.py ChunkString._tag/VarMisuse@32/35 `tok`->`self`