Predictionary
A learning JavaScript dictionary-based word prediction / autocomplete / suggestion library.
Install / Use
/learn @asterics/PredictionaryREADME
Predictionary
JavaScript dictionary-based word prediction library with self-learning abilities.
Installation
Drop the following into your page:
<script src="https://unpkg.com/predictionary/dist/predictionary.min.js"></script>
or install the package via npm:
npm install predictionary --save
Note: to use inside a nodejs application use the flag --experimental-modules in order to be able to use Predictionary which is written as ES6 module. See nodejs demo which can be run with:
node --experimental-modules demo/node-demo/app.mjs
Basic usage
Minimum working example for basic usage:
import Predictionary from 'predictionary' //only if installed via npm
let predictionary = Predictionary.instance();
predictionary.addWords(['apple', 'apricot', 'banana']);
let suggestions = predictionary.predict('ap'); // == ['apple', 'apricot'];
Demo
See working demo: to live demo
API Documentation
see full API documentation: to API documentation
Acknowledgements
Thanks to Mark Davies, Professor of Linguistics at Brigham Young University (Utah), for the permission to use his n-gram sample data from https://www.ngrams.info/iweb.asp for training purposes of this library.
Word frequency lists for demos are taken from the Centre for Translation Studies, University of Leeds, see http://corpus.leeds.ac.uk/list.html - thanks!
Related Skills
docs-writer
99.5k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
340.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
ddd
Guía de Principios DDD para el Proyecto > 📚 Documento Complementario : Este documento define los principios y reglas de DDD. Para ver templates de código, ejemplos detallados y guías paso
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
