Jul
8
Filed under: Asides | July 8th, 2005

Google Spell Checker

The source code to Google’s new toolbar for Firefox has some entertaining details and reveals their new spell checker web service, which I think is really nice. Who’ll be the first to rewrite the AJAX spell checker for WordPress to use this web service instead of the PHP pspell extension?

Possibly related posts:

  1. Google Analytics script 40% still use old Google Analytics script. Don’t forget to...
  2. TwitterFE Rewriting Twitter for web best practices. It has some rough...
  3. Embedding WP.com Video Implementing WordPress.com Video on a WordPress.org site. It’s easy, but...
  4. Berlin WordPress / Web 2.0 Expo Drinkup I’m in Germany for the first time and I’d love...
  5. WordPress CodeSniffer WordPress CodeSniffer Standard. Helps you format your code in wp-style....

19 Responses

  • Mark J | July 8th, 2005 @ 11:50 am | Reply

    I nominate Firas! He expressed interest in a web-service-based spell checker.

  • Firas | July 8th, 2005 @ 12:24 pm | Reply

    Yeah, but not google’s :) Nik said he wanted to make something that wraps around GMail’s spell checker. This is even better.

  • Denis de Bernardy | July 8th, 2005 @ 12:26 pm | Reply

    That would be especially sweet on top of a wysiwyg editor. :)

  • Sammo | July 8th, 2005 @ 2:17 pm | Reply

    This might interest you…

  • Sebbi | July 8th, 2005 @ 4:10 pm | Reply

    Only good for one language. Where is the multi-language spell checker, google?

  • Chris meller | July 8th, 2005 @ 6:01 pm | Reply

    Welp, I’m in no way a JavaScript expert, but from what I can tell, neither Mozilla nor IE will allow you to XMLHttpRequest a link that’s not local, unless you go through the process of getting a digital ID and signing your code… So the typical AJAX approach wouldn’t seem to work (unless I’m missing something).

    So, in order to work around this “security measure”, I wrote a PHP script that accepts the words to be spell checked and simply POSTs to Google’s SSL page (using Curl) and returns the results, just like they do… You could then use Ajax to poll your page (which is local) as normal…

    You can find my working test (including all source code) at: http://dacnomm.com/googlespell/
    I also go into slightly more detail on my blog at: http://incoherentbabble.com

  • Mark J | July 8th, 2005 @ 8:00 pm | Reply

    Sebbi, not true!

    Danish, German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Finnish and Swedish are all supported by Google’s spell check feature.

  • Sebbi | July 9th, 2005 @ 1:19 am | Reply

    Mark, where?

  • zz85 | July 9th, 2005 @ 8:33 am | Reply

    Chris meller implementation is cool too…

    It shouldnt be hard to use that, as in modifing pspell to “wrap” around google spell.

    The spellchecker I have http://www.lab4games.net/zz85/blog/wordpress-plugins/live-spell-checker/ currently have a google style checking and a check as you type style (using emil’s spellchecker, port from cgi to php using pspell wrappers again ;) .

    There doesnt seems to be much interest in it now but anyone wants a google check feature to it, hands up?

  • Chris meller | July 9th, 2005 @ 9:29 am | Reply

    If you click the down arrow next to the Check button, you’ll get a list of languages to check in…

  • Matt Robin | July 9th, 2005 @ 12:23 pm | Reply

    Will there be a distinction for UK-English Vs. US-English? Spell checkers are great, but not when they can’t make the distinction between the different versions of English – then they are just semi-good.

  • zz85 | July 9th, 2005 @ 12:44 pm | Reply

    surprise suprise…

    See what I got here.
    http://www.lab4games.net/zz85/blog/2005/07/10/spot-the-difference-for-spell-check-engine/

    Who’ll be the first to rewrite the AJAX spell checker for WordPress to use this web service instead of the PHP pspell extension

    Not really me because I just modified the plugin rather than rewrite it ;)

  • Chris meller | July 9th, 2005 @ 4:30 pm | Reply

    It doesn’t exist in the toolbar now, but I wouldn’t be surprised if it were added in the future. Historically, Google has released somewhat rough products at first, then gone back and added in lots of little features later. I was looking for a ‘Suggest a Feature’ link somewhere on the toolbar site, but didn’t find one. Be patient, I’m sure it’ll get added eventually.

  • Nik Cubrilovic | July 10th, 2005 @ 7:46 pm | Reply

    I believe the Gmail spell-checker distinguishes UK and US english by looking at your Accept-Language request header, hence how it also knows which language you are checking the spelling for. We can not use the Gmail spell checker in Wordpress, since it is behind an auth wall, but this open API that the toolbar uses sounds interesting at first, but since the API is not supposed to be used by third-parties then any plugin will always just be a hack and with every little change google makes it will break all installs. Best solution in building a proper spell-checking plugin for WP without relying on pspell (which nobody seems to have installed) would be to either

    a) rely on a proper API such as what UrbanDictionary provide (Firas pointed that out). Limitations are that every user needs to get an API key and it is limited to 1000 transactions a day.
    b) use pspell on the command line. Limitations are that it wont work on windows, lots of servers with no psell or ispell installed
    c) setup an API on a server for WP blogs to use. downside is that other people will stumble on it and abuse it for other applications, no real way to only allow WP blogs to use it
    d) write a plugin that has its own dictionary, no dependancies at all etc. Downside is that dictionary files are large.

    At the moment I am leaning towards D as the ‘best’ solution. Though probably not the ‘right’ solution.

  • Shane | July 11th, 2005 @ 1:46 pm | Reply

    That rocks Firas! :)

  • Matt Robin | July 11th, 2005 @ 4:25 pm | Reply

    Excellent and very comprehensive comment Nik!

  • jane | March 29th, 2008 @ 4:57 pm | Reply

    Not Ajax but heres a java class that interacts with the google spell checker.

    http://www.gmacker.com/web/content/tutorial/googlespellchecker/googlespellchecker.htm

Share your thoughts