OPTIMADE icon indicating copy to clipboard operation
OPTIMADE copied to clipboard

Add automatic (English) spell spelling

Open giovannipizzi opened this issue 5 years ago • 2 comments

From the discussion in #122

In order to have to add to the words list a very long list of keywords, I suggest passing to pyspelling that is able to skip code blocks, still giving the actual work to aspell.

I suggest:

  • adding the configuration pyspelling, that can be run with pyspelling -c spelling_config.yml; the configuration reported at the bottom is very close to a good one
  • Recreating the words list from an empty words list
  • moving these files in a subfolder to avoid too much confusion in the repo

Up to here, I see no harm. Then:

  • Once this is done, rediscuss if this is good enough to be added to the travis tests or it's too much work (see also #122)

If we feel the need of keeping also a words list for the whole document, we can also do so - but as discussed in #122 we shouldn't add this to travis.

Content of spelling_config.yml:

matrix:
- name: markdown
  sources:
  - optimade.md
  aspell:
    lang: en
  dictionary:
    wordlists:
    - .words.lst
  pipeline:
  - pyspelling.filters.markdown:
      markdown_extensions:
        - markdown.extensions.fenced_code
  - pyspelling.filters.html:
      comments: false
      attributes:
        - title
        - alt
      ignores:
        - code
        - pre

giovannipizzi avatar Jun 16 '19 06:06 giovannipizzi

Is this still relevant? Spellcheck seems to be in place already, so maybe this is already done?

merkys avatar Jun 08 '21 10:06 merkys

I think I added this in #336... wasn't aware of this previous effort. Using pycheckspelling to skip code blocks could be useful though, I had to add several edgecases to the words list

ml-evs avatar Jun 08 '21 16:06 ml-evs

I'm going to say this is closed by #336; spell check has been flagging some things for a while for us though could always be improved (I don't think the schemas are currently spellchecked, for example)

ml-evs avatar Mar 25 '24 13:03 ml-evs