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

Ability to check spelling #9

Open
ajeanmahoney opened this issue Dec 14, 2023 · 5 comments
Open

Ability to check spelling #9

ajeanmahoney opened this issue Dec 14, 2023 · 5 comments
Assignees

Comments

@ajeanmahoney
Copy link
Collaborator

The RPC currently runs its files through aspell to check spelling. However, our official dictionary is Merriam-Webster, and we check words manually there. It would be nice if the Merriam-Webster API could be used.

Another nice-to-have feature is the ability to select American or British spelling when doing a spell check. As long as British spelling is used consistently, it is accepted. If a mix of American and British spelling is used, we update the document to use American spelling.

@ajeanmahoney
Copy link
Collaborator Author

The user should be able to step through each highlighted instance and do one of the following: accept the current spelling, update the highlighted word with a proposed correction, skip to the next instance. Accepting the current spelling writes the term to a document-specific wordlist. This wordlist should be editable in case a term is incorrectly added.

@ajeanmahoney
Copy link
Collaborator Author

The user should be able to select a custom wordlist (e.g., draftstring-nn-wordlist) in addition to a standard wordlist when checking spelling. This is helpful when checking two documents that reference each other (e.g., load the draft-foo-bar-architecture-01-wordlist to check the spelling of draft-foo-bar-security-03.xml).

@NGPixel
Copy link
Member

NGPixel commented Oct 9, 2024

aspell would be the best solution for draftforge as well. The interface to the CLI seems straightforward (ref). There's no native build for Windows but I found a script to compile it so it could be added to the build workflow.

For the merriam-webster integration, we have the following options:

  • ask users to enter their own API key (free up to 1000 queries per month)
  • use the same key for all users and include it in the app. This effectively makes the key somewhat public as even if we don't include it in the source code itself and only the build, it can be reverse-engineered quite easily. Depending on the usage, it could easily go above 1000 queries per month and would incur costs.
  • Have a small app running in the cloud to proxy the requests to the Merriam-Webster API. The key stays private and better control over usage.

@NGPixel NGPixel self-assigned this Oct 9, 2024
@ajeanmahoney
Copy link
Collaborator Author

Would aspell be part of the DraftForge install?

My read of the m-w API documentation is that the key is per app and not per user...

@NGPixel
Copy link
Member

NGPixel commented Oct 10, 2024

It would be downloaded in the background when opening the app for the first time. (Similar to the lemminx server for validating XML)

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