Search code examples
ubuntugraphautocompletestoragetrie

Autocomplete High Level Interpretation


I've implemented a variation on the autocomplete program in python using trie-trees and matching against words from the Ubuntu standard dictionary. From my understanding trie trees are the fastest however I realize they do take up a considerable amount of space.

I'm looking to bring this to mobile however I am extremely concerned about memory limitations. My question is: what is the most efficient way to store the contents of a full-english dictionary and also ensuring optimal lookup time for entries as this structure will be queried/utilized heavily?


Solution

  • A very efficient way to store a dict is a Directed Acyclic Word Graph (DAWG).

    Here are some links:

    then there is a varient of Trie called Ternary search tries, this is very memory efficinet and has fast look up speed