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

add spell checking support #90

Merged
merged 75 commits into from
Sep 14, 2022
Merged

add spell checking support #90

merged 75 commits into from
Sep 14, 2022

Conversation

ThierryO
Copy link
Collaborator

No description provided.

@ElsLommelen
Copy link
Contributor

An issue that may be typical to the Dutch language: the use of hyphens. Some examples to illustrate:

  • zomer- en wintereik gives a spelling error for zomer-
  • html-bestand or `.html`-bestand
    I'm not sure this can be solved on a general level?

Note that `.html`-bestand is viewed as -bestand by the spell checker.

I think it is only safe to the replace the hyphen in case it is in the middle of the word (html-bestand becomes two words html and bestand). Or when the word starts with a hyphen (-bestand is checked a bestand). I'm reluctant to change that for words ending with an hyphen. They might not be a correct word on themselves. In such case, add them to the custom dictionary.

In case of zomer- en wintereik, I 'd prefer to add zomer- en wintereik to to the custom dictionary instead of zomer-, because the latter is not a correct word on itself (like you mention). Is it an option to implement that, or is it too complicated? (It can be useful for expressions as well, but the use is maybe too limited to do the effort?)

(Of course I don't mind adding the word manually to the dictionary file, but for now adding this is not preventing from marking zomer- as an error.)

@ThierryO
Copy link
Collaborator Author

ThierryO commented Jul 4, 2022

xxx / yyy / zzz seems to be the proper way to write this. I'll remove any / that is surrounded by whitespace. So xxx / yyy / zzz will be checked as xxx yyy zzz, whereas xxx/yyy/zzz will remain xxx/yyy/zzz.

Could it be that this issue is only solved for .Rmd files and not for .Rd files (yet)?

fixed in abb87f7

@ThierryO
Copy link
Collaborator Author

ThierryO commented Jul 4, 2022

An issue that may be typical to the Dutch language: the use of hyphens. Some examples to illustrate:

  • zomer- en wintereik gives a spelling error for zomer-
  • html-bestand or `.html`-bestand
    I'm not sure this can be solved on a general level?

Note that `.html`-bestand is viewed as -bestand by the spell checker.
I think it is only safe to the replace the hyphen in case it is in the middle of the word (html-bestand becomes two words html and bestand). Or when the word starts with a hyphen (-bestand is checked a bestand). I'm reluctant to change that for words ending with an hyphen. They might not be a correct word on themselves. In such case, add them to the custom dictionary.

In case of zomer- en wintereik, I 'd prefer to add zomer- en wintereik to to the custom dictionary instead of zomer-, because the latter is not a correct word on itself (like you mention). Is it an option to implement that, or is it too complicated? (It can be useful for expressions as well, but the use is maybe too limited to do the effort?)

(Of course I don't mind adding the word manually to the dictionary file, but for now adding this is not preventing from marking zomer- as an error.)

I don't think that would work. hunspell:hunspell() does the spell checking. It considers zomer- en wintereik as three separate words.

@ThierryO ThierryO marked this pull request as ready for review July 5, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we check spelling?
2 participants