'Convert a chunk-parse tree to a list of tagged tokens.'

@staticmethod
def _parse_to_tagged(sent):

    toks = []
    for child in sent:
        if isinstance(child, Tree):
            if (len(child) == 0):
                print('Warning    --    empty    chunk    in    sentence')
                continue
            toks.append((child[0], 'B-{0}'.format(child.label())))
            for tok in child[1:]:
                toks.append((tok, 'I-{0}'.format(child.label())))
        else:
            toks.append((child, 'O'))
    return toks
