-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Idea: spellcheck as part of the tests? #118
Comments
I like this idea! |
https://github.com/azerupi/mdBook/issues/141 is relevant to these interests! |
So, in #275 I found a few spellings thanks to aspell. Now I discovered a needed change to tell aspell about encodings of "personal dictionaries" it uses. It is now possible to generate a dictionary file with valid words (should be reviewed manually, but can be created only once and updated incrementally when new specific words appear) and then check book contents with global "language" dictionary and a personal one. Here is a script to generate dictionary and check files if dictionary exists: https://gist.github.com/JIghtuse/0a92074f56007d2010396063aa221bf5#file-spellcheck-sh And here is a current dictionary file for the book: https://gist.github.com/JIghtuse/0a92074f56007d2010396063aa221bf5#file-dictionary-txt Would be glad to help integrating it into CI! 😸 |
That would be awesome!!! I think the requirements for getting this into CI are:
Bonus (optional) tasks, I can take care of these if you want:
Please let me know if any of this is unclear or if you get stuck with anything! |
@carols10cents pretty clear, thanks! I'll try to make these changes asap. |
Hey! I finally implemented it. aspell can be weird at times! I've made a few workarounds.
|
@carols10cents please look at the last three commits in https://github.com/JIghtuse/book/commits/master and if it is fine, I'll create a PR. |
As an alternative, here is a python script doing the same checks: https://gist.github.com/JIghtuse/a059d63bf31b56c0e71ac03e69584f48 Code looks a bit clearer for me and doesn't have aspell quirks, but it generates a bit more false positives, so it is needed to extend dictionary with words like:
Also, there is no interactive mode like aspell provides, but probably this script is easier to maintain than proposed bash solution. What do you think? |
@JIghtuse the bash script solution looks fine to me!! I'm excited to see it in action-- open that PR! :) |
Proofread ch06-00
ch13-04 の comprehensive を「包括的な」に
Maybe this is more work than it's worth, considering that we'd need to ignore code blocks and add words like "enum" to whatever dictionary that gets used, buuuut it's a thought I had that I wanted to see what other people thought.
aspell
suggests "enema" for "enum", btw.The text was updated successfully, but these errors were encountered: