Use custom dictionary with hunspell #195
-
Hello, I'm trying to configure this plugin to spell check my teaching site and need assistance. I want to use hunspell, because there are dictionaries that support my language dialect with this tool: ca_Es_valencia I've looked at the documentations and some examples, but I can't figure out how to use this custom dictionary.
This is my current configuration: spellchecker: hunspell
matrix:
- name: mkdocs
pipeline:
- pyspelling.filters.html:
comments: false
attributes:
- title
- alt
ignores:
- ':matches(code, pre)'
- 'a:matches(.magiclink-compare, .magiclink-commit, .magiclink-repository)'
- '.md-social__link'
- 'span.keys'
- '.arithmatex, .md-nav__link, .md-footer-custom-text, .md-source__repository, .headerlink, .md-icon'
- pyspelling.filters.url:
sources:
- site/**/*.html
hunspell:
# I've tested with -p option too
d: docs/src/dictionary/hunspell/ca-ES-valencia.dic Which gives the following error: $ pyspelling
ERROR: site/apunts/01_introduccio/01_introduccio/index.html: html>body>div>footer>div>div>div.md-copyright -- Runtime Error: Can't open affix or dictionary files for dictionary named "docs/src/dictionary/hunspell/ca-ES-valencia.dic". Anyone can give me some guidance on how to do this? I'm trying this in a branch in my project, which can be found at: https://github.com/joapuiib/curs-git/tree/feature/spelling Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
I've made some steps:
Modifying the config to: hunspell:
d: ca-ES-valencia And running pyspelling like this: DICPATH="docs/src/dictionary/hunspell" pyspelling Seems to work. |
Beta Was this translation helpful? Give feedback.
I'm also not sure how well
-r
plays with Pyspelling.Have you tried running Pyspelling locally with the steps in your actions (at least the relevant steps)?