• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Spell Check with WebObjects [Bug in ERXGoogleSpell API]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Spell Check with WebObjects [Bug in ERXGoogleSpell API]


  • Subject: Spell Check with WebObjects [Bug in ERXGoogleSpell API]
  • From: shravan kumar <email@hidden>
  • Date: Tue, 11 Nov 2008 10:45:11 -0800 (PST)

Hello Mike/ Project Wonder Team,

I see a bug in the ERXGoogleSpell API and just want to bring to your attention. Please validate.

In the suggestions(text, lang, hl) method, I think we should pass-in 'hl' as the last argument after '&hl=' query string, but 'lang' is passed instead:

Current Code:

URL url = new URL("https://www.google.com/tbproxy/spell?lang="; + lang + "&hl=" + lang);

Modified/Fixed Code:

URL url = new URL("https://www.google.com/tbproxy/spell?lang="; + lang + "&hl=" + hl);

Code snippet from ERXGoogleSpell.java :
-------------------------------------
public static Correction[] suggestions(String text, String lang, String hl) throws CorrectionException {
		try {
			StringBuffer request = new StringBuffer();
			request.append("<spellrequest textalreadyclipped=\"0\" ignoredups=\"1\" ignoredigits=\"1\" ignoreallcaps=\"0\"><text>");
			request.append(ERXStringUtilities.escapeNonXMLChars(text));
			request.append("</text></spellrequest>");

			URL url = new URL("https://www.google.com/tbproxy/spell?lang="; + lang + "&hl=" + lang);

--------------------------------------

Please advise.

Thank You,
Shravan
-----------------------

Forwarded Message: Re: Spell Check with WebObjects
Re: Spell Check with WebObjectsSunday, November 9, 2008 6:56 PM
From: "Mike Schrag" <email@hidden>
To: "webobjects List" <email@hidden>
> Am planning to use ERXGoogleSpell as earlier suggested by Mike. So, does this limitation needs to be considered?
sure

> and BTW, do I need to get any key to use this service for Live WebObjects application.
I would assume you need a key ... The google docs will tell you.

ms



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Spell Check with WebObjects [Bug in ERXGoogleSpell API]
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Spell Check with WebObjects
  • Next by Date: Re: Unit testing & loading models
  • Previous by thread: Re: capistrano deployments w/ wo
  • Next by thread: Re: Spell Check with WebObjects [Bug in ERXGoogleSpell API]
  • Index(es):
    • Date
    • Thread