def _tagged_to_parse(self, tagged_tokens):
        sent = Tree('S', [])

        for (tok,tag) in tagged_tokens:
            if tag == 'O':
                sent.append(tok)
            elif tag.startswith('B-'):
                sent.append(Tree(tag[2:], [tok]))
            elif tag.startswith('I-'):
                if (sent and isinstance(sent[-1], Tree) and
                    sent[-1].label() == tag[2:]):
                    sent[-1].append(tok)
                else:
                    sent.append(Tree(tag[2:], [tok]))
        return sent
Create a temporary local file and return its path. The file will be
dataset/ETHPy150Open nltk/nltk/nltk/chunk/named_entity.py/NEChunkParser._tagged_to_parse--crossover with--dataset/ETHPy150Open amnong/easywebdav/tests/__init__.py/TestCase._local_file