Tophster


I'm trying to make a simple little gadget to (1) correct the spelling of the word the user inputs, if necessary, and (2) find the definition.

I wondered for a while how to do the dictionary bit. At first I was thinking about how the URL for a definition from, say, Encarta or Dictionary.com is in a prettty simply format (e.g. http://dictionary.reference.com/browse/word), but didn't really know how to make use of that. So I decided I'd use Live Search's Instant Answers feature, where if you search "define [word]" it'll have a definition for [word] at the top of the search results. e.g.: http://search.live.com/results.aspx q=define+word

So as it stands currently I have a User Input block > Live Spell Checker block > Text Helper block (to add "define " to the beginning of the input string) > Live Search returning just the first result. And all that pretty much works fine--it returns the first result for "define [spellchecked word]."

Unfortunately, it seems Live Search doesn't call the Instant Answer a "result." So the first result is a random web site, not the definition. Any tips on another way to do this (You can take a look if you want, I've shared it...)

http://www.popfly.ms/users/Toph
http://www.popfly.ms/users/Toph/Dictionary




Re: Dictionary Gadget

jianxu


It seems the problem is in the "Live Spell Checker" block. If the user input spell is correct, or the block finds nothing, the spell checker block outputs "No suggestions found". Remove the spell checker and the output is what you expected (but missing the spell suggestion feature).





Re: Dictionary Gadget

Firedog1024

You are correct that the Live Web Search block does not return instant answer results. There is a seperate API for Live Instant Answers, unfortunately we are currently unable to publish the instant answer results due to licensing agreements.

The data contained in the Live Instant Answers is licensed content and can only be used on certain web sites that are part of the agreement. We have been working on an Instant Answer block but it looks like we will be unable to release it due to these restrictions.

The only thing I could suggest is to search around for a SOAP or web interface that can get you the dictionary data you need, you might need to do some string manipulation to get the actual data you want. You should also check with any data sources to make sure redisplaying the data from the web site is allowed, for Dictionary.com they have specific details on linking and using there data, see http://dictionary.reference.com/help/linking/