Multiple dictionaries for spell checker


#1

Hi,

As I sat down to write some notes for some studying I was supposed to do, I became frustrated with squiggly red lines under my correct Australian spelling :slight_smile:.

I’ve added support to the spell checker to support dictionaries other than the US https://github.com/inkdropapp/inkdrop-spell-checker/pull/2 This will only work on Linux as it looks for dictionary files in /usr/share/hunspell/ which are placed there by the myspell packages.

Would appreciate of anyone could explore other operating systems and see if standard dictionaries exist. Search for files called en_US.aff

It is a bit of a hack at the moment and could be made a bit prettier but it works.

Cheers,
John


#2

Hi John,

Thank you for the PRs!
That looks great. I’ll review it next week :smiley:


#3

Hi!

Have you had any time to look at these yet?


#4

Hi John,

I’m sorry for the long delay!
I have looked into your pull requests. Thank you so much for your contribution!

BTW, I’ve got some points to discuss about this.

  • https://github.com/inkdropapp/codemirror-spell-checker/pull/1/files
    • This PR makes the plugin depend on NodeJS. As we plan that the mobile app also supports plugins but NodeJS doesn’t run on it, I would avoid depending the plugin on it. Besides, it works only on Linux in this case.
    • I guess L43 does make no sense because the base url (https://cdn.jsdelivr.net/codemirror.spell-checker/latest/) doesn’t have any files for other languages.
    • Instead, I’d prefer this PR for multi-language support. It allows you to specify full URLs for language files. No nodejs dependency. If you send the same PR to mine, I would be happy to merge it.
  • https://github.com/inkdropapp/inkdrop-spell-checker/pull/2/files
    • This looks nice. But I would think there is a better approach for this.
    • Use this repo for language files.
    • Make it configurable from preferences so that you don’t need to implement a dialog for settings.

Thanks to your PRs, I found a promising way to accomplish supporting other languages.
Since I’m working on other features now, I’ll add this feature to a draft of the next roadmap!

Thanks again.


#5

Hi,

I’ve created a new pull request against codemirror-spell-checker

I think it would be great if this was a core feature instead of a plugin!

Cheers,
John