Traditional Culture Encyclopedia - Traditional festivals - Advantages and disadvantages of the three methods of word cutting

Advantages and disadvantages of the three methods of word cutting

The three advantages and disadvantages are as follows:

1, based on the Trie tree cut word advantage is the use of the Trie tree string retrieval characteristics, in the word without knowing the length of the word, according to a node in the tree down to match until the end of the encounter position on the disadvantage of constructing the dictionary is more complex.

2, the whole word binary word cut advantage is fast, by building the hash of the word hash table and word index table, fast query speed. The disadvantage is low precision.

3, word by word binary word cut advantage is the integration of the whole word binary storage advantage and Trie tree query advantage. High precision, word-by-word matching, no ambiguity.