Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to correct spelling mistakes in Google custom API

I am using Google's custom search API, I make an HTTP request to a URL that looks like this:

https://www.googleapis.com/customsearch/v1?key=<my-key>&cref=&num=10&q=how+can+i+do+htis

if you search for "how can i do htis" on Google you are told "Showing results for how can i do this", and give you some results (call them result set A)

but if you use the API to search for the misspelled string, you get different results than those of A... Searching with a correctly spelled string gives you result A, which matches the ordinary search service on Google

Is there a way to search directly using the suggested string? I want to use the API I can't afford implementing a spell checker myself that can also correct people names and everything

like image 419
Mohamed Khamis Avatar asked Nov 07 '11 18:11

Mohamed Khamis


People also ask

How do you correct the misspelled words?

A quick way to correct a misspelled word in Microsoft Word is to right-click on the word that has a red wavy underline. The resulting pop-up menu contains spelling suggestions which you can then select and have the misspelled word replaced.

Does Google Docs have spell check?

You can check your spelling and grammar in Google Docs, then accept or ignore the corrections. Spelling and grammar suggestions are available in English, Spanish, French, German, Portuguese, and Italian.

What is spelling correction in NLP?

Spelling correction is a well-known task in Natural Language Processing (NLP). Automatic spelling correction is important for many NLP applications like web search engines, text summarization, sentiment analysis etc.

Where would you go first if you want to check your Google Doc for spelling and grammar?

Open the document you'd like to check for grammar and spelling. Tap on the letter “A” icon with a checkmark in the main menu on the top left. The new spell check menu will appear on the right. It'll offer a word suggestion to correct incorrect spelling or grammar.


1 Answers

I think what you want to do is possible using the spelling suggestions of Google. This is part of the xml-results returned by your query.

See API here.

like image 52
jean-charles Avatar answered Nov 15 '22 09:11

jean-charles