This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df9af57
commit b4a811d
Showing
2 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,55 @@ | ||
# nextword | ||
Suggests the next English word. | ||
# Nextword | ||
Predict a next English word. | ||
|
||
![powa](img/terminal.gif) | ||
|
||
## Install | ||
|
||
0. (Recommended) Star this repository (`・ω・´)★ | ||
|
||
1. [**IMPORTANT**] Install [Nextword-data (https://github.com/high-moctane/nextword-data)](https://github.com/high-moctane/nextword-data) | ||
|
||
2. Install this program (You need Go language compiler). | ||
|
||
```bash | ||
$ 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: | ||
-Greedy | ||
show as many result as possible | ||
-candidate-num int | ||
max candidates number (default 100) | ||
-data string | ||
path to the data directory (default "/Users/moctane/Assets/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 ..." | ||
``` | ||
## Contributing | ||
Please feel free to send pull requests. | ||
## License | ||
MIT |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.