Google Toolbar Spell Check API

I saw in this post that the Google toolbar could be extracted and looked at. So, I spend an afternoon reverse engineering the spell checker api. The api ends up to be very easy to use. Checking is done with an HTTP post to http://www.google.com/tbproxy/spell?lang=en&hl=en. The xml structure looks like this...
 
<?xml version="1.0" encoding="utf-8" ?>
<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">
    <text>Ths is a tst</text>
</spellrequest
>
 
The response look like ...
 
<?xml version="1.0" encoding="UTF-8"?>
<spellresult error="0" clipped="0" charschecked="12">
    <c o="0" l="3" s="1">This Th's Thus Th HS</c>
    <c o="9" l="3" s="1">test tat ST St st</c>
</spellresult
>
 
Tag
Description
o
the offset from the start of the text of the word
l
length of misspelled word
s
Confidence of the suggestion
text
tab delimited list of suggestions
 
I created a complete C# GoogleSpell library as a demo. The library can be download at http://www.loresoft.com/files/uploads/GoogleSpell.zip
 
Here is an example on how to use GoogleSpell …
 
string text = "ths is a tst";
SpellRequest request = new SpellRequest(text);

SpellResult result = SpellCheck.Check(request);

foreach (SpellCorrection correction in result.Corrections)
{
    Console.WriteLine("Misspelled: {0} ({1}:{2})"
        text.Substring(correction.Offset, correction.Length), 
        correction.Offset, correction.Length);

    foreach(string suggestion in correction.Suggestions)
    {
        Console.WriteLine("    {0}", suggestion);
    }
}
 
I plan to develop an ajax web client for the google spell api.  This will be really sweet as it won't require anything to be installed on the sever other then a js file.  I'll post again when I have the web client complete.
 
~ Paul
Published Tuesday, July 19, 2005 12:29 AM by pwelter34
Filed under:

Comments

# re: Google Toolbar Spell Check API

I want to install your spell check and you will not let me.

Stop using Spanish instesd of English

Friday, July 27, 2007 8:58 PM by Mary E Kelly

# re: Google Toolbar Spell Check API

I want Google to add a spell check to the tool bar How do I do it?

Saturday, July 28, 2007 9:03 PM by Mary E Kelly

# re: Google Toolbar Spell Check API

google tool bar with spell check

Sunday, October 7, 2007 3:57 PM by hasan.ottoman

# re: Google Toolbar Spell Check API

I need Toolbar spell check

Tuesday, November 27, 2007 2:50 PM by ziad

# re: Google Toolbar Spell Check API

Looks good, but probably doesn't work.

The xml I every time get in response is:

<?xml version="1.0" encoding="UTF-8" ?>

 <spellresult error="1" />

Please, say your ideas, why?

Thanks in advance,

Dan

Friday, February 22, 2008 9:15 AM by Dan

# re: Google Toolbar Spell Check API

thanks. you helped me a lot.

Tuesday, March 11, 2008 7:46 AM by mihalich

# re: Google Toolbar Spell Check API

I wrote the program in Java to send the HTTP POST (using same xml file).

Got the response :

<?xml version="1.0"?>

<spellresult error="0" clipped="0" charschecked="-1"/>

Do you have any ideas why?

Thursday, March 13, 2008 2:50 PM by Olga

# re: Google Toolbar Spell Check API

Hi,

I have a Yahoo tool bar but I need Spell Check from

google.  How do I do that?

Thank you,

Estella Franco

Friday, May 9, 2008 11:53 PM by Estella Franco

# re: Google Toolbar Spell Check API

Hi,

Need your Google Spell Check Tool Bar.  How do I get it?

Thanks,

Estella

Saturday, May 10, 2008 1:54 AM by Estella Franco

# re: Google Toolbar Spell Check API

need your google check speller tool bar

Wednesday, May 14, 2008 6:32 PM by Magda

# re: Google Toolbar Spell Check API

i am not a greatspeller,i have yahoo.com i want google as my email wab

Wednesday, July 16, 2008 11:52 PM by mary

# re: Google Toolbar Spell Check API

Do I have to install the google toolbar in order to use the spellcheck api code?

Wednesday, July 30, 2008 7:23 PM by Susan

# re: Google Toolbar Spell Check API

I inadvertantly deinstalled my toolbar row with among other things, spell check.  I would dearly love to reinstall it.

Thursday, August 7, 2008 3:47 PM by walt slaughter

# re: Google Toolbar Spell Check API

I am trying to download spellcheck for microsoft word.

Saturday, August 16, 2008 3:30 PM by owen wright

# re: Google Toolbar Spell Check API

please can you help me i need spell check on my computer

Friday, August 22, 2008 9:52 PM by Frances

# re: Google Toolbar Spell Check API

because it gone of my tool bar

Saturday, October 18, 2008 8:05 PM by david cuuman

# re: Google Toolbar Spell Check API

I would like to have spell check on my tmoble phone

Saturday, November 8, 2008 3:25 PM by sarah oparanadi

# re: Google Toolbar Spell Check API

NEED TO ISTALL SPELL CHECK WITH COMPOSE MAIL

Monday, November 10, 2008 6:33 PM by ZIA

# re: Google Toolbar Spell Check API

I love google spell checker

Saturday, December 13, 2008 8:26 PM by Michael Brown

# re: Google Toolbar Spell Check API

want to put spell check on my tool bar

Friday, March 6, 2009 5:12 PM by glenna meeks

# re: Google Toolbar Spell Check API

i lick to have  spelling check in my tool bar

Saturday, April 18, 2009 9:02 PM by afshin

# re: Google Toolbar Spell Check API

My lenguage is Spanish and I need the Google speling tool bar urgently

Thank You

Thursday, May 7, 2009 12:42 PM by mario gonzalez flores

# re: Google Toolbar Spell Check API

l want the google toolbar spell check apl on my toolbar  ok think you

Saturday, August 22, 2009 2:51 PM by migdalia ortiz

# re: Google Toolbar Spell Check API

Works great!  Got it to work in Actionscript 3.  Thanks!

Wednesday, August 26, 2009 10:41 AM by Carl

# re: Google Toolbar Spell Check API

I want the google toolbar spell check apl on my toolbar. ok thank you

Wednesday, September 9, 2009 10:29 PM by Frances Wolfe

# re: Google Toolbar Spell Check API

Easy access for my wrining

Sunday, October 25, 2009 6:59 PM by Florentino Barril SR

# re: Google Toolbar Spell Check API

This code and the attachment is not working.

Wednesday, January 13, 2010 2:35 AM by Michael Amadore

# re: Google Toolbar Spell Check API

i need speel chek on my toolbar

Sunday, February 21, 2010 2:20 AM by rock

# re: Google Toolbar Spell Check API

I want spell check on my tool bar

Saturday, March 6, 2010 5:32 PM by Peter Shultz

# re: Google Toolbar Spell Check API

when i am trying to run the application, it gives me the error : "The underlying connection was closed: The remote name could not be resolved."

any help appreciated

Tuesday, May 25, 2010 3:03 AM by jasu123

# re: Google Toolbar Spell Check API

отлично сделано, интеретсно читать 98)

Sunday, June 13, 2010 5:59 AM by kikus

# re: Google Toolbar Spell Check API

just installed google tool bar and the spell check is not working and that is the only reason i installed it was to have spell check!

Thursday, September 9, 2010 5:46 PM by roberta monahan