I’m inheritently lazy…Inheritently, is that the correct spelling? Instead of opening Word, or shock horror, actually leafing through a real dictionary, I now just plug the word into Google and look at the “Did you mean:” entry at the top of the page. And sure enough inheritently is in fact “inheritantly”. Thank you Google.
So, to demonstrate how easy Google’s Web Service APIs are to use within your .NET applications, here is a small application to grab and display a spelling correction in Google:
1. You need to obtain a license key to use the Google service. This is automated and free to all, however you are restricted to 1,000 queries (or spelling checks!) a day.
2. Add a Web Reference to your project from the http://api.google.com/GoogleSearch.wsdl entry point.
3. Drop 3 controls onto your form: A Label, a TextBox and a Button.
4. On the button click event, create a Google search object and use the doSpellingSuggestion method to return the correct spelling of the word you entered into the Label control on the form:
Google.GoogleSearchService search = new Google.GoogleSearchService();
Label1.Text = search.doSpellingSuggestion("xxxxxxxxx",TextBox1.Text);
And that is that. Spelling, thanks to Google :)
Pointless? Perhaps. Cool? Yes.