':param text: A list containing tokenized text
:type text: list(str)
:return: A list of the tokenized text with multi-words merged together
:rtype: list(str)
:Example:
>>> tokenizer = MWETokenizer([(\'hors\', "d\'oeuvre")], separator=\'+\')
>>> tokenizer.tokenize("An hors d\'oeuvre tonight, sir?".split())
[\'An\', "hors+d\'oeuvre", \'tonight,\', \'sir?\']'

def tokenize(self, text):

    i = 0
    n = len(text)
    result = []
    while (i < n):
        if (text[i] in self._mwes):
            j = i
            trie = self._mwes
            while ((j < n) and (text[j] in trie)):
                trie = trie[text[j]]
                j = (j + 1)
            else:
                if (Trie.LEAF in trie):
                    result.append(self._separator.join(text[i:j]))
                    i = j
                else:
                    result.append(text[i])
                    i += 1
        else:
            result.append(text[i])
            i += 1
    return result
