searxng icon indicating copy to clipboard operation
searxng copied to clipboard

Feature: Spelling / Did you mean?

Open Aetherinox opened this issue 1 year ago • 9 comments

Is your feature request related to a problem? Please describe. At present, search engines such as Google will put a corrected / suggested correct spelling for a word at the top of search results if you happen to spell something incorrectly.


Describe the solution you'd like

An attempt to automatically suggest a corrected word in the event that the user may not know the correct spelling for something.


Describe alternatives you've considered

No real alternative aside from just spelling the word correctly. I did review some different APIs for other languages and came across libraries such as https://serpapi.com/spell-check (just as an example).

https://apilayer.com/marketplace/dymt-api


Additional context

The obvious thing here is that it must be a way that continues to ensure privacy, but also doesn't railroad us with a bunch of restrictions / API limits, which greatly narrows down the options. I looked online to see if search engines such as Google offered this type of API for "Did you know", and I could not find anything other than Google offering a "Custom Search Engine" service, which still uses Google search, but narrows down what the user can search through.

k3GnzHtrgp

Aetherinox avatar Sep 12 '24 13:09 Aetherinox

FWIW: personally I use auto completion to fix my spelling ..

grafik

return42 avatar Sep 15 '24 11:09 return42

Hi @return42, I want to work on this Issue, Can I be assigned ? I believe we don't need to use 3rd-party API's as this might violate the user's privacy. Instead, the approach I want to take is to use the pyspellchecker library, It does a good job at finding spelling errors and fixing them, and It also supports multiple languages including Spanish,French,German and etc. What do you think about this ?

sepehr-rs avatar Sep 17 '24 02:09 sepehr-rs

Using a spell checker for this would be the optimal solution, as the less APIs we have to rely on, the better.

Aetherinox avatar Sep 17 '24 04:09 Aetherinox

hello is spellcheck working? if yes is there a version of this codebase that has it ? ok thxz

lisawebcoder avatar Jan 09 '25 11:01 lisawebcoder

hello is spellcheck working? if yes is there a version of this codebase that has it ? ok thxz

@lisawebcoder please familiarize yourself with the usual communication and research options .. as you may have noticed, this is a "feature request" ... until this process is completed, this request is open --> so the answer is "no", it is not implemented .. since there is no PR associated with this ticket yet, there is also no code base for it yet.

return42 avatar Jan 09 '25 14:01 return42

One thing to add on to here that I just noticed yesterday in a Reddit discussion.

There was a lot of confusion with search engines such as Google and the usage of quotation marks and mis-spelled words, and I think if we decide to implement this feature, if we should go the way of other major search engines, or if we want to try and do something different.

The Reddit post is below. It's supposed to be funny, but it brings up an interesting point:

  • https://reddit.com/r/mildlyinfuriating/comments/1hwtoci/why_the_hell_do_you_think_i_put_the_quotations/

Summary

Some people are under the assumption that by enclosing your search keywords in quotations, that the search engine should accept the spelling that you've decided to use, instead of auto-correcting it.

Major search engines such as Google, will automatically show you results with the spelling correction automatically, instead of showing results based on the incorrect spelling you've entered.

The argument that is in 9 out of 10 cases, a person actually mis-spelled a word and wants results with the corrected spelling, not the mis-spelled results.

Aetherinox avatar Jan 09 '25 22:01 Aetherinox

I'm happy this feature request has been made. 💯 This is the biggest need I have before I'm able to fully switch to using SearXNG.

The argument that is in 9 out of 10 cases, a person actually mis-spelled a word and wants results with the corrected spelling, not the mis-spelled results.

I agree here, however I as someone with dyslexia (or someone else where English is their second language (and a good chunk of the internet is in English)) around 9 out of 10 of my searches I've misspelled something and have grown accustom to the suggested correction being provided by the search engine. I would say 1 out of 10 times when I initiate a search, it's actually to get a more sophisticated spell check on a word that local spell checkers have failed at.

I have a local instance of LanguageTool running, which takes care of spell checking in the search field, but it doesn't help when initiating a search from the browser URL bar. I've also setup auto complete suggestions with Firefox's URL bar search, but for various privacy reasons responses from my instances of SearXNG take about 1-2 seconds to complete.

So having a suggestion provided at the top of the search results would help those use case.

Anyhow, thanks for all of your hard working on this project!

rubin110 avatar Feb 21 '25 16:02 rubin110

I as someone with dyslexia

me too .. auto completion is our friend --> https://github.com/searxng/searxng/issues/3816#issuecomment-2351550377

return42 avatar Feb 21 '25 17:02 return42

My partner just elegantly worded this out for me:

It's an accessibility feature.

rubin110 avatar Feb 21 '25 20:02 rubin110