Google Toolbar Spell Check API

Posted Tuesday, July 19, 2005 12:29 AM by pwelter34
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/downloads/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
Filed under:

Comments

# re: Google Toolbar Spell Check API

Sunday, July 30, 2006 2:13 AM by kia

thankyou

# BrideL.OrG &raquo; Blog Archive &raquo; Flex Spell Checker Component

# Terry&#8217;s Worklog &raquo; Dspace hack #2 &#8212; Did you mean?

Friday, September 22, 2006 1:22 AM by Terry’s Worklog » Dspace hack #2 — Did you mean?

# I&#8217;m Mike &raquo; Blog Archive &raquo; Hacking Google Spell Checker for Fun and Profit

# re: Google Toolbar Spell Check API

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

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

Stop using Spanish instesd of English

# re: Google Toolbar Spell Check API

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

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

# re: Google Toolbar Spell Check API

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

google tool bar with spell check

# re: Google Toolbar Spell Check API

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

I need Toolbar spell check

# re: Google Toolbar Spell Check API

Wednesday, January 02, 2008 3:29 PM by Dilish

Its really interesting..

But it seems the link is not working for me.

www.loresoft.com/.../googlespell.zip  

Please help

Thanks

Dilish

# re: Google Toolbar Spell Check API

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

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

# re: Google Toolbar Spell Check API

Friday, February 29, 2008 5:14 PM by wilbertharden

all I want too know is: how can I install the spell check function on my google desktop

# re: Google Toolbar Spell Check API

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

thanks. you helped me a lot.

# re: Google Toolbar Spell Check API

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

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?

# Component | FlexSpellCheck with source code &laquo; Flash Enabled Blog

Pingback from  Component | FlexSpellCheck with source code &laquo; Flash Enabled Blog

# re: Google Toolbar Spell Check API

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

Hi,

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

google.  How do I do that?

Thank you,

Estella Franco

# re: Google Toolbar Spell Check API

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

Hi,

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

Thanks,

Estella

# re: Google Toolbar Spell Check API

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

need your google check speller tool bar

# re: Google Toolbar Spell Check API

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

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

Leave a Comment

(required) 
(required) 
(optional)
(required)