constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
385 stars 59 forks source link

Spellcheck in Constellation #870

Open antares1470 opened 3 years ago

antares1470 commented 3 years ago

Prerequisites

Description

For text fields in Data Access View plugins and elsewhere, spell check underlining misspelled words would help prevent typos in what is being submitted.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

Auriga2 commented 2 years ago

Based on below comparison we chose JLanguagetool as it has ongoing releases, good documentation and support. image

But currently having issues getting it to work when the library is downloaded with ivy. It works in a new Maven project.

Performance Regarding the slowness, it was only observed when debugging. When running it was relatively faster. When dealing with multiple threads,

Create one instance of JLanguageTool per thread, but create the language only once (e.g. new BritishEnglish()) and use that for all instances of JLanguageTool

Also consider suggestions here:

You’ll see that only the very first initializing is slow. After that, it will be fast, no matter from how many threads it’s called. That’s what we do on languagetool.org and it works fine to serve many hundred thousand requests per day from a single machine.

For better performance we can also use MultiThreadedJLanguageTool

Ignore Words Ignore should just leave the current text the user has typed while an Add to Dictionary option can be added to permanently ignore it, and consider it as a valid word. In JLanguagetool addIgnoreTokens or acceptPhrases can be used for that. Further reading suggests that will only work within the same instance of JLanguageTool though. That means it'd not apply in other threads.

arcturus2 commented 2 years ago

spelling error

My view is that to start with knowing that a word is misspelled is still useful and is a good enough MVP before we look at adding suggestions or adding it to a dictionary. The above example is NetBeans's built in text editor which shows that a word is spelled incorrectly and stops there. It is still useful to know that even if I don't get a suggestion.

Auriga2 commented 2 years ago

@arcturus2 We can simply add the suggestions as well, ideally I was planning to pop up the suggestions on the left click of a misspelt word, similar to the https://languagetool.org/. That way we have the possibility to leave the right click Context Menu options, hopefully.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

HolandCrick commented 4 months ago

@Auriga2 - Thanks for enhancing the Spelling Check in Data Access View. It's working nicely in Data Access View only, though need to add this enhancement to other area like Notes View or wherever users might find it useful.

Spelling Check is not working in Notes View: image

Created New Ticket #2050

antares1470 commented 3 months ago

As it turns out, there were a number of breaking issues that were resulting from the indriya dependency which spellcheck added a version of. These have included:

Consequently, it seems this feature wasn't as ready as we thought it was, and so we're re-opening this ticket