-
Notifications
You must be signed in to change notification settings - Fork 47
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
[RFE] Add the ability to check for non-desirable words #148
Comments
What does "non-desirable" mean? |
Those words which I do not want to have used. Like a blacklist (denylist?). |
The PyEnchant filter API won't quite do what you want, since that only emits words that should be checked against the dictionary. One way would be to modify the checker to understand about alternative ways to check words besides the dictionary, and then you can add the set of undesirable words via a configuration option with a filename just like we do for the custom dictionary. https://github.com/sphinx-contrib/spelling/blob/master/sphinxcontrib/spelling/checker.py#L51 On the other hand, it might make more sense to create a separate builder. One limitation of the spelling builder is that it only looks at one word at a time after passing them through the PyEnchant tokenizer. Creating your own builder would let you process the text yourself, and open up features like preventing the use of multi-word phrases (lingo, slang, etc.). https://github.com/sphinx-contrib/spelling/blob/master/sphinxcontrib/spelling/builder.py#L165 |
I think this is a dupe of #120 so I'm going to close it and track any future work in this area on that ticket. |
This seems like an obvious one but I don't see it in the documentation. How can Sphinx be informed of non-desirable words?
The text was updated successfully, but these errors were encountered: