Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
modify options
Browse files Browse the repository at this point in the history
  • Loading branch information
high-moctane committed Jan 18, 2020
1 parent b4a811d commit 74998aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ $ nextword -h
Nextword prints the most likely English words that follow the stdin sentence.

Usage of /Users/moctane/go/bin/nextword:
-Greedy
-g
show as many result as possible
-candidate-num int
-c
max candidates number (default 100)
-data string
-d string
path to the data directory (default "/Users/moctane/Assets/nextword-data")
-h show this message
-v show version
Expand All @@ -46,10 +46,6 @@ Example:
output: "was would were went with will who wrote when wants ..."
```
## Contributing
Please feel free to send pull requests.
## License
MIT
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import (
)

// Version (semantic)
const Version = "0.0.1"
const Version = "0.0.2"

// environmental variable
const nextwordDataPath = "NEXTWORD_DATA_PATH"

// flags
var versionFlag = flag.Bool("v", false, "show version")
var dataPath = flag.String("data", os.Getenv(nextwordDataPath), "path to the data directory")
var candidateNum = flag.Int("candidate-num", 100, "max candidates number")
var dataPath = flag.String("d", os.Getenv(nextwordDataPath), "path to the data directory")
var candidateNum = flag.Int("c", 10, "max candidates number")
var helpFlag = flag.Bool("h", false, "show this message")
var greedyFlag = flag.Bool("Greedy", false, "show as many result as possible")
var greedyFlag = flag.Bool("g", false, "show as many result as possible")

func main() {
if err := run(); err != nil {
Expand Down

0 comments on commit 74998aa

Please sign in to comment.