🎉 NEW PREDICTION ENGINE MOCWORD IS AVAILABLE 🎉
Mocword is more advanced engine than Nextword.
- Less data file size
- 1.63GB (Nextword) -> 655MB (Mocword)
- Using latest Google Ngram dataset
- 2012 data (Nextword) -> 2020 data (Mocword)
- More appropriate prediction
- Less noisy vocabularies
Predict a next English word.
-
[IMPORTANT] Install Nextword-data (https://github.com/high-moctane/nextword-data)
-
Visit Releases page and download an appropriate binary for your architecture.
NOTE: You can also compile this project manually if you want.
$ go get -u github.com/high-moctane/nextword
$ nextword -h
Nextword prints the most likely English words that follow the stdin sentence.
Usage of /Users/moctane/go/bin/nextword:
-g
show as many result as possible
-n
max candidates number (default 10)
-d string
path to the data directory (default "/path/to/nextword-data")
-h show this message
-v show version
You need to install nextword-data and set "NEXTWORD_DATA_PATH" environment variable.
It available at https://github.com/high-moctane/nextword-data
The result depends on whether the input string ends with a space character.
If the string does not end with a space, nextword will print candidate words which
begin the last word in the sentence.
Example:
input: "Alice was "
output: "not a the in still born very so to beginning too at sitting ..."
input: "Alice w"
output: "was would were went with will who wrote when wants ..."
For testing, you need to install nextword-data LARGE version and set
NEXTWORD_TEST_DATA_PATH
environment variable in advance.
$ go test
MIT