autocomplete algorithms, papers, strategies, etc

后端 未结 3 635
清酒与你
清酒与你 2020-12-12 17:59

I\'m wondering if anyone has good resources to read or code to experiment for \"autcomplete\"

I would like to know what\'s the theory behind autocompletion, where t

3条回答
  •  没有蜡笔的小新
    2020-12-12 18:12

    Autocomplete is usually implemented using one of the following:

    • Trees. By indexing the searchable text in a tree structure (prefix tree, suffix tree, dawg, etc..) one can execute very fast searches at the expense of memory storage. The tree traversal can be adapted for approximate matching.
    • Pattern Partitioning. By partitioning the text into tokens (ngrams) one can execute searches for pattern occurrences using a simple hashing scheme.
    • Filtering. Find a set of potential matches and then apply a sequential algorithm to check each candidate.

    A couple of papers about the subject:

    • Bořivoj Melichar. Approximate String Matching by Finite Automata;
    • Gonzalo Navarro. A Guided Tour to Approximate String Matching;
    • Leonid Boytsov. Indexing Methods for Approximate Dictionary Searching: Comparative Analysis;
    • Marios Hadjieleftheriou and Divesh Srivastava. Approximate String Processing;
    • Surajit Chaudhuri and Raghav Kaushik. Extending Autocompletion To Tolerate Errors;

    Take a look at completely, a Java autocomplete library.

提交回复
热议问题