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

Consider spelling/grammar/etc. checking #14

Open
Infernio opened this issue Feb 13, 2022 · 0 comments
Open

Consider spelling/grammar/etc. checking #14

Infernio opened this issue Feb 13, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Infernio
Copy link
Member

Infernio commented Feb 13, 2022

We'll probably want to use LanguageTool. There's a python wrapper that we should try.
But most important is thinking about how we can represent this AST mess as plaintext for LanguageTool to operate on, and then map that plaintext back to the AST nodes so that we can accurately highlight in the source code where errors came from.

Also:

$ time hunspell -l /tmp/test.txt
[...]
real    0m0.065s
user    0m0.062s
sys     0m0.004s
$ time languagetool --language en-US /tmp/test.txt
[...]
real    0m6.373s
user    0m20.568s
sys     0m0.590s

So we can certainly afford to do automatic spell checking, but grammar etc. checking should be reserved for a special command (zoia check, probably) and should download languagetool only then (considering it's like 200MB in size).
Edit: actually, I want zoia build to be as fast as possible - turn code into output (HTML/plaintext) ASAP. zoia check can afford to be slower.
Also think about how to use the system languagetool when possible.

Not a v0.1.0 thing, spellchecking can be added much later.

@Infernio Infernio added the enhancement New feature or request label Feb 13, 2022
@Infernio Infernio added this to the v0.2.0 milestone Jun 1, 2022
@Infernio Infernio added this to v0.2.0 Jun 1, 2022
@Infernio Infernio moved this to Todo in v0.2.0 Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant