A simple Trie implementation for Node.js.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dict Add in tests for succinct trie and binary search string. Mar 22, 2011
vendor
.gitmodules Use Benchmark.js for performance testing. Mar 17, 2011
Bits.js Change the ORD() function to an object for faster lookups, based upon… Mar 23, 2011
README.md
build-trie.js Sort `words` before building trie May 10, 2016
dump-trie.js Pulling in the initial work and tests. Mar 16, 2011
load.html Fix rogue endline that snuck through the build process. Mar 17, 2011
lookup.html Add a simple test for checking the lookup time of a Succinctly-stored… Mar 22, 2011
test-build-binary.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-dummy.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-hash.js
test-build-string.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-succinct.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-build-trie.js
test-find-binary.js
test-find-hash.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-string.js Add in tests for succinct trie and binary search string. Mar 22, 2011
test-find-succinct.js
test-find-trie.js Fix finding repeated word bug May 11, 2014
util.js Fix finding repeated word bug May 11, 2014

README.md

A Simple JavaScript Trie Generator

By John Resig

Copyright 2011 John Resig
MIT Licensed

All code is designed to work in Node.js.

To clone this repository including the Benchmark.js submodule:

git clone --recursive https://github.com/jeresig/trie-js.git

To build an optimized Trie run:

node build-trie.js > dict/suffix.js

To dump a full dictionary of words from the Trie do:

node dump-trie.js

A sample function for finding a word in the Trie can be see in util.js, named findTrieWord.