omphalos / automark

Markov chain-style auto-completion using JavaScript n-grams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automark

Automark is an experimental Markov-model-style autocompleter, with a demo of JavaScript autocompletion.

Demo

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.

License

MIT

About

Markov chain-style auto-completion using JavaScript n-grams


Languages

Language:JavaScript 82.7%Language:CSS 15.0%Language:HTML 2.0%Language:Shell 0.3%