Skip to content
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

Add misspell command to CLI #1057

Merged
merged 4 commits into from
Jan 16, 2025
Merged

Add misspell command to CLI #1057

merged 4 commits into from
Jan 16, 2025

Conversation

wannaphong
Copy link
Member

Fixes #615

Add command line interface for generating misspelled texts.

  • Add misspell command to pythainlp/cli/__init__.py and pythainlp/__main__.py.
  • Implement App class in pythainlp/cli/misspell.py to handle misspelling generation.
  • Add argument parsing for --file, --seed, --misspell-ratio, and --output.
  • Read input file, apply misspelling, and save output file.
  • Update docs/notes/command_line.rst to include documentation for the new misspell command.
  • Add tests for the new command in tests/core/test_cli.py.

For more details, open the Copilot Workspace session.

Fixes #615

Add command line interface for generating misspelled texts.

* Add `misspell` command to `pythainlp/cli/__init__.py` and `pythainlp/__main__.py`.
* Implement `App` class in `pythainlp/cli/misspell.py` to handle misspelling generation.
* Add argument parsing for `--file`, `--seed`, `--misspell-ratio`, and `--output`.
* Read input file, apply misspelling, and save output file.
* Update `docs/notes/command_line.rst` to include documentation for the new `misspell` command.
* Add tests for the new command in `tests/core/test_cli.py`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/PyThaiNLP/pythainlp/issues/615?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

sonarqubecloud bot commented Jan 8, 2025

@coveralls
Copy link

Coverage Status

coverage: 52.888% (+0.1%) from 52.753%
when pulling 3367c03 on wannaphong/add-misspell-command
into 7332984 on dev.

@coveralls
Copy link

Coverage Status

coverage: 52.914% (+0.2%) from 52.753%
when pulling 3367c03 on wannaphong/add-misspell-command
into 7332984 on dev.

@wannaphong wannaphong added the enhancement enhance functionalities label Jan 16, 2025
@wannaphong wannaphong merged commit e238e84 into dev Jan 16, 2025
23 of 41 checks passed
@wannaphong wannaphong deleted the wannaphong/add-misspell-command branch January 16, 2025 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhance functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command line for generating misspell texts
2 participants