'Return a sequence of pos-tagged words extracted from the tree.
>>> t = Tree.fromstring("(S (NP (D the) (N dog)) (VP (V chased) (NP (D the) (N cat))))")
>>> t.pos()
[(\'the\', \'D\'), (\'dog\', \'N\'), (\'chased\', \'V\'), (\'the\', \'D\'), (\'cat\', \'N\')]
:return: a list of tuples containing leaves and pre-terminals (part-of-speech tags).
The order reflects the order of the leaves in the tree\'s hierarchical structure.
:rtype: list(tuple)'

def pos(self):

    pos = []
    for child in self:
        if isinstance(child, Tree):
            pos.extend(child.pos())
        else:
            pos.append((child, self._label))
    return pos
