def is_a_valid_terminal_node()

in modeling/coval/conll/mention.py [0:0]


    def is_a_valid_terminal_node(self, tag, pos):
        if len(tag.split()) == 1:
            if (any(c.isalpha() for c in tag) or \
                any(c.isdigit() for c in tag) or tag == '%') \
                  and (tag != '-LRB-' and tag != '-RRB-') \
                  and pos[0] != 'CC' and pos[0] != 'DT' and pos[0] != 'IN':# not in conjunctions:
                return True
            return False
        else: # for exceptions like ", and"
            for i, tt in enumerate(tag.split()):
                if self.is_a_valid_terminal_node(tt, [pos[i]]):
                    return True
            return False