def merge_pos_tokens(self, pos_tokens):
        """
        takes an array of Part of Speech labeled tokens and returns a set of tokens where word tokens have been merged into Noun phrases.
        :param pos_tokens: an array of (token, POS)
        :returns: returns an array of word and phrase tokens
        """
        if pos_tokens is None or len(pos_tokens)<0:
            return ""
        tokens, pos = zip(*pos_tokens)
        pos_phrase_ids = self.convert_noun_phrases(tokens, pos)
        phrase_ids, phrase_pos = zip(*pos_phrase_ids)
        phrase_text = convert_run_to_text(phrase_ids, phrase_dictionary=self)
        return zip(phrase_text, phrase_pos)
def merge_pos_tokens ( self , pos_tokens ) : if pos_tokens is None or len ( pos_tokens ) < 0 : return "" tokens , pos = zip ( * pos_tokens ) pos_phrase_ids = self . convert_noun_phrases ( tokens , pos ) phrase_ids , phrase_pos = zip ( * pos_phrase_ids ) phrase_text = convert_run_to_text ( phrase_ids , phrase_dictionary = self ) return zip ( phrase_text , phrase_pos )
takes an array of Part of Speech labeled tokens and returns a set of tokens where word tokens have been merged into Noun phrases.
        :param pos_tokens: an array of (token, POS)
        :returns: returns an array of word and phrase tokens