1. A method for automatically building a contracted dictionary from a given list of multi-word units, comprising: receiving an input list of original multi-word units; and employing a computer device for: transforming each of the original multi-word units into single word elements; associating an identifier with each single word element to obtain a collection of unique identifiers, each identifier being associated with a single word element; storing the collection of identifiers and associated single word elements in a letter dictionary based on a trie, wherein: each entry is a single word element; letters of the single word elements are nodes of the trie; and identifiers are glosses attached to the terminal nodes of the trie; encoding each original multi-word unit in the input list by replacing each single word element within each multi-word unit by the associated identifier; storing the encoded multi-word units in an identifier trie-based dictionary, wherein each entry is a set of identifiers representing a multi-word unit and each node is an identifier; and building a contracted dictionary by contracting the letter trie-based dictionary and the identifier trie-based dictionary; the contracting comprising, for the letter trie-based dictionary and the identifier trie-based dictionary, merging trie nodes while preserving each entry of the letter trie-based dictionary and each entry of the identifier trie-based dictionary.