Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/high-moctane/nextword
Predict next English words.
https://github.com/high-moctane/nextword
english nextword
Last synced: 14 days ago
JSON representation
Predict next English words.
- Host: GitHub
- URL: https://github.com/high-moctane/nextword
- Owner: high-moctane
- License: mit
- Archived: true
- Created: 2019-09-26T07:06:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-19T16:29:49.000Z (over 2 years ago)
- Last Synced: 2024-08-01T17:30:26.506Z (3 months ago)
- Topics: english, nextword
- Language: Go
- Homepage:
- Size: 361 KB
- Stars: 65
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nextword
## **🎉 NEW PREDICTION ENGINE [MOCWORD](https://github.com/high-moctane/mocword) IS AVAILABLE 🎉**
[Mocword](https://github.com/high-moctane/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.
![gif](img/terminal.gif)
## Installing
1. [**IMPORTANT**] Install [Nextword-data (https://github.com/high-moctane/nextword-data)](https://github.com/high-moctane/nextword-data)
2. Visit [Releases](https://github.com/high-moctane/nextword/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
```## Usage
```
$ 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 versionYou need to install nextword-data and set "NEXTWORD_DATA_PATH" environment variable.
It available at https://github.com/high-moctane/nextword-dataThe 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 ..."
```## Testing
For testing, you need to install nextword-data **LARGE** version and set
`NEXTWORD_TEST_DATA_PATH` environment variable in advance.```
$ go test
```## License
MIT