-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--lang
option
#55
--lang
option
#55
Changes from 14 commits
34dc25e
7cb4886
60e10b7
e790d03
df71c1f
4683e17
1dbac39
ce7edff
b19a485
4dc4e4b
36ea83c
b52d387
a605a7b
c36174e
c508d0e
1c03f6e
a52c8ab
371a0ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ __pycache__ | |
*.pyc | ||
*.log | ||
*.egg-info | ||
*,cover | ||
*.coverage | ||
cov.xml | ||
|
||
# Python related files | ||
build/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,9 +91,13 @@ For more details of the JavaScript model, please refer to [JavaScript module REA | |
You can also format inputs on your terminal with `budoux` command. | ||
|
||
```shellsession | ||
$ budoux 本日は晴天です。 | ||
$ budoux 本日は晴天です。 # default: japanese | ||
本日は | ||
晴天です。 | ||
|
||
$ budoux -l zh 今天天气晴朗。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I want to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
今天天气 | ||
晴朗。 | ||
``` | ||
|
||
```shellsession | ||
|
@@ -114,21 +118,26 @@ If you want to see help, run `budoux -h`. | |
|
||
```shellsession | ||
$ budoux -h | ||
usage: budoux [-h] [-H] [-m JSON] [-d STR] [-t THRES] [-V] [TXT] | ||
usage: budoux [-h] [-H] [-m JSON | -l LANG] [-d STR] [-t THRES] [-V] [TXT] | ||
|
||
BudouX is the successor to Budou, | ||
the machine learning powered line break organizer tool. | ||
|
||
positional arguments: | ||
TXT text (default: None) | ||
|
||
optional arguments: | ||
options: | ||
-h, --help show this help message and exit | ||
-H, --html HTML mode (default: False) | ||
-m JSON, --model JSON custom model file path (default: /path/to/models/ja-knbc.json) | ||
-m JSON, --model JSON custom model file path (default: /home/eggplants/prog/budoux/budoux/models/ja-knbc.json) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably we may want to generalize the default model path. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
-l LANG, --lang LANG language of custom model (default: None) | ||
-d STR, --delim STR output delimiter in TEXT mode (default: ---) | ||
-t THRES, --thres THRES threshold value to separate chunks (default: 1000) | ||
-V, --version show program's version number and exit | ||
|
||
supported languages of `-l`, `--lang`: | ||
- zh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
- ja | ||
``` | ||
|
||
## Caveat | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this comma should be a dot instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I executed
pytest --cov-report annotate
, somehow*,cover
files were generated. But it is not generated when I run it now. So I'll delete this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c508d0e