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

Spelling with hunspell-nl dictionary results in error E201 Invalid value #776

Open
1 task done
koenvervloesem opened this issue Feb 19, 2024 · 2 comments
Open
1 task done

Comments

@koenvervloesem
Copy link

Check for existing issues

  • Completed

Environment

  • Ubuntu 22.04.3 LTS
  • Vale installed from PyPI with pip3 install -U vale
  • Vale 3.1.0

Describe the bug / provide steps to reproduce it

I wrote the following rule to add Dutch spelling:

extends: spelling
message: "Bedoelde je echt '%s'?"
level: error
dicpath: /usr/share/hunspell/
dictionaries:
  - nl

I installed the hunspell-nl package (sudo apt install hunspell-nl), which is created by the OpenTaal project.

After running Vale on a Dutch text with this rule enabled, I get the following error:

E201 Invalid value [/home/koan/vale/Koen_NL/spelling.yml:1:1]:

   1* extends: spelling
   2  message: "Bedoelde je echt '%s'?"
   3  level: error

CrossProduct is not Y or N: got "0"

Execution stopped with code 1.

When I change the dictionary to en in the spelling rule, running Vale succeeds, so there's something in the Dutch dictionary file that makes it fail.

@Gerrit2022
Copy link

Same problem with vale 3.4.2 on Mint21.
Hunspell nl_NL Date and version: 2020-12-24 15:42:49 2.20.18

Problem seems to be in nl_NL.aff. If I remove everything after 'COMPOUNDMIN 0' I get a different error message from Vale
And in nl_NL.dic is a line that causes problems:
CO/<tab>Cw
After removing the TAB Vale checks work.

@Gerrit2022
Copy link

Did some further testing and Vale doesn't seem to use the FLAG long option from nl.aff. As a result, all flags from nl.dic are handled as single character flags, which can't be found in nl.aff.

For now, please change the error message so that is clear whether the error is in the YML config file or there is a problem within the specified language files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants