Tries for efficient automatic word completion in Python & C++.
Scala Go Ruby Java Python C++
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit behind vivekn:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
benchmarking
java
scala
test
.gitignore
LICENSE.txt
README.md
trie.go
trie.h
trie.py
trie.rb
trie_test.go

README.md

Autocomplete with Trie

Tries for efficient automatic word completion in several languages.

Implementations

  • C++ - Vivek Narayanan (@vivekn)
  • Go - Martijn van Maasakkers (@mvmaasakkers)
  • Java - Marcus McCurdy (@volker48)
  • Python - Vivek Narayanan (@vivekn)
  • Ruby - Colin Dean (@colindean)

Want to add an implementation? Submit a pull request! Please also submit tests and preferably a benchmark, too.

How to Use

See the tests or the benchmarks for examples, but the general gist is something like this, in Ruby notation:

trie = Trie.new
trie.insert("word")
array_of_words_that_begin_with = trie.autocomplete("wo")

License - BSD