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

Spellcheck does not return proper corrections #2804

Open
2 of 5 tasks
inventivestom opened this issue Jan 4, 2024 · 11 comments
Open
2 of 5 tasks

Spellcheck does not return proper corrections #2804

inventivestom opened this issue Jan 4, 2024 · 11 comments

Comments

@inventivestom
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Operating System

  • macOS
  • Windows
  • Linux

Operating System Version

Windows 11 home 64 bit intel i9

It happens on the web browser too?

No, it just happens on the Desktop app

Rocket.Chat Desktop App Version

3.9.11

Rocket.Chat Server Version

6.4

Describe the bug

Spellcheck does not return some of the correct and most obvious corrections. FOr example, when I write "beleive", the proper result is not included in the returned corrections. When I am working in the browser, I get the right results. It seems like the results are being filtered and something is filtering out these obvious results on the desktop app. On the mobile app I have (Android Note 10, RC V 4.44.2) the autocorrect (I use Grammarly keyboard) corrects these mistakes.

image

Another example is "didnt" which is missing the apostrophe. In a browser the top result is the proper word "didn't" but on the RocketChat desktop app, that's not generated in the list.
image

FInally, one last example is the following typo "propbably", which doesnt return probably in the correction list, where the browser does.
image

I propbably find at least 4-5 a day and its always the same behavior, the most obvious and correct results are not included in the list at all, basically making the the spell checking useless on at least 30% of the mistakes my team has sees

How to Reproduce

  1. Log into rocketchat desktop app
  2. Start a new message
  3. Enter the word beleive or didnt or propbably
  4. View result list for each one

Describe your Expected behavior

I expect the results to be comparable to other spellcheck functions on the browser of the phone. It seems like the spellchecker is just completely excluding some of the most likely corrections from the list and in many cases, I am only getting like 2 results. There are open source algos that would solve these problems quite simply:

https://medium.com/@agusnavce/a-quick-overview-of-the-implementation-of-a-fast-spelling-correction-algorithm-39a483a81ddc

Anything else

No response

Are you willing to submit a code contribution?

  • Yes, I am willing to submit a Pull Request!
@preeesha
Copy link

preeesha commented Jan 7, 2024

Hey @inventivestom, thanks for your kind suggestions. That seems like an helpful change to make.

@preeesha
Copy link

preeesha commented Jan 7, 2024

I am working on this issue.
@jeanfbrito I'll be updating you with the progress soon.

@Giridharan002
Copy link

Hi @inventivestom,
On the RocketChat desktop app, the spellcheck feature is working fine for me. I've tested it on my end and it seems to be functioning correctly. If you're still experiencing issues, it might be worth trying to update your RocketChat desktop app to the latest version. If the problem persists, could you please provide a video demonstrating the issue? This will greatly assist me in understanding and resolving the problem.

spellcheck

@preeesha
Copy link

preeesha commented Feb 6, 2024

@jeanfbrito do you allow the use of external spellchecker libraries as they would be beneficial for the overall UX?

@jeanfbrito
Copy link
Collaborator

The spellcheck is provided by the Operation System. We would need to see what can be done about it.

@preeesha
Copy link

preeesha commented Feb 6, 2024

Okay @jeanfbrito

I feel for a better experience we can add more suggestions to the spellchecker just like chrome and chromium does.

After researching on this topic I found that electron also provides a first class support to add custom suggestions to the spellchecker.

We can leverage one of any popular spellchecker libraries to do so.

What do you think about it? Please let me know.

@jeanfbrito
Copy link
Collaborator

Of course, can you share your ideas and references? We just cant overload the app, but any improvement is welcome.

@preeesha
Copy link

preeesha commented Feb 6, 2024

You're right. Using a custom spellchecker library will add bloat of the dictionary of the specific language.

After researching, I found a fairly popular library called electron-spellchecker which rather than using a custom dictionary leverages the dictionary of existing chrome/chromium installation.

Going by its size vs value ratio, I think it's the perfect choice for our use case.

Here's the link:
https://www.npmjs.com/package/electron-spellchecker

Please let me know your views.

@jeanfbrito
Copy link
Collaborator

jeanfbrito commented Feb 7, 2024 via email

@preeesha
Copy link

@jeanfbrito this is the most updated library of all. After researching more on the topic I found that OS affects the suggestions to a basic level and on top of that chrome uses its own spell checker called enhanced spell checker which is provided by google.

I think this library is the best and the most updated library we can integrate in the our app.

I would really like to have a green or red signal from your side.

Thanks for your time
Prisha Gupta

@jeanfbrito
Copy link
Collaborator

@preeesha Sorry, we cant add this library as it isn't updated for the last 4 years already.

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

4 participants