Automark is an experimental Markov-model-style autocompleter, with a demo of JavaScript autocompletion.
The demo is based on a sampling of JavaScript n-grams in the following open-source JavaScript projects:
JavaScript n-grams are constructed by using acorn to tokenize the JavaScript samples and construct two n-gram trees, one grammar-based, and one textual.
During autocompletion, the trees are traversed and their results combined to provide a short list of suggestions for the programmer.
The code for the UI portion for the demo is based heavily on CodeMirror's Autocomplete demo.
MIT