-
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
Conversation
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.
Thank you for your proposal! I think this is a great idea to add the lang
option to the CLI. Some change requests below:
.gitignore
Outdated
@@ -6,6 +6,9 @@ __pycache__ | |||
*.pyc | |||
*.log | |||
*.egg-info | |||
*,cover |
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.
README.md
Outdated
本日は | ||
晴天です。 | ||
|
||
$ budoux -l zh 今天天气晴朗。 |
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.
Actually, I want to use zh-hans
as the language code because I would like to emphasize that this is for Simplified Chinese (hans), not for Traditional Chinese (hant) here.
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.
README.md
Outdated
-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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
-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 comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to use zh-hans
here.
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.
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.
Thank you for the fix!
I have added
-l
,--lang
option to select a model by a language code.