predict-next-word
v0.1.4
Published
A tool to build dictionaries and predict likely next word based on frequency in the dictionary
Downloads
4
Readme
predict-next-word is a proof of concept assistive communication tool built by Justin Isaf for Blink with Iris Chang and Dane Tomseth.
It attempts to predict the most likely next word in a sentence based on a seed dictionary.
It can also learn as users interact with it more to build a more accurate custom dictionary.
This is a very basic proof of concept, using files as storage and sync versions of fs for quick and dirty development. It will be updated with mongoDB storage and made fully promise/async ready as time permits.
Installation: npm install --save predict-next-word
let predict = require('predict-next-word');
Seed default dictionary: predict.ingestFile()
(currently only uses a default file input.txt
)
Learn a new sentence: predict.ingest("some sentence goes here")
Predict the word most likely to come after word
: predict.getNextWords("word")
Get the data on a word
in your dictionary: predict.lookupWord("word")