Yahoo YQL Web Service JSON Thesaurus Tutorial

Yahoo YQL Web Service JSON Thesaurus Tutorial

Yahoo YQL Web Service JSON Thesaurus Tutorial

Here is a tutorial that might be re-introducing you to the Yahoo Web Services called YQL, building on previous ones here at this blog. The name is the way it is because it simplified the API aspects of its functionality for the developer to concentrate on SQL, and I’m really supportive of this concept. You don’t have to output in JSON, as other data forms like XML are acceptable. Let’s see what Wikipedia says about YQL below.

Yahoo! Query Language (YQL) is an SQL-like query language created by Yahoo! as part of their Developer Network. YQL is designed to retrieve and manipulate data from APIs through a single Web interface, thus allowing mashups that enable developers to create their own applications.[1]

Initially launched in October 2008 with access to Yahoo APIs,[2] February 2009 saw the addition of open data tables from third parties such as Google Reader, the Guardian, and The New York Times.[3] Some of these APIs still require an API key to access them. On April 29th of 2009, Yahoo introduced the capability to execute the tables of data built through YQL using JavaScript run on the company’s servers for free.[3]

So this tutorial uses a YQL web service into the data emanating from its links to the altervista thesaurus web service database with Yahoo YQL website … thanks. For the altervista thesaurus database usage it is best to request a key for your web service queries. You fill in a word (or two, or three) of interest to search for like-minded words.

And what is a thesaurus? Read what Wikipedia says here but, basically, it can be thought of as a repository of a language’s list of words of a similar meaning to the word of your interest. It is a great tool for people learning a language foreign to them, especially regarding their vocabulary.

The two big PHP functions of use (as distinct from an Ajax approach, requiring no PHP … read on) for this are:

  • file_get_contents
  • json_decode … when there is a data structure of any complexity, this function is highly recommended, but for today’s tutorial we do not use it, and take the opportunity to show you a solution using Ajax that requires no PHP … link to some downloadable Ajax inspired HTML programming source code which you may want to rename to Ajax_yql_thesaurus.html which changes from the HTML supervising PHP approach as per Ajax_yql_thesaurus.html (and then there is an Ajax live run)

Good links for information regarding this tutorial (thanks) are:

Another tool you should have in your armoury for jobs like this is the online JSON validator here. A generic JSON approach to issues could be:

  1. Type the URL you were given into a web browser address bar and have a look at it
  2. Type the URL you were given into //jsonlint.com/ and have it validated
  3. Understand in your own mind what would be different about 1. to make it suitable
  4. Incorporate findings of 3. into massaging of data between file_get_contents and json_decode

Here is a link to some downloadable HTML programming source code which you may want to rename to yql_thesaurus.html which calls some downloadable PHP programming source code which you may want to rename to yql_thesaurus.php (and then there is a PHP live run).

We thank the following free online dictionaries …

Stay tuned for an interesting blog posting tomorrow which combines the new thesaurus functionality of today’s contribution, along with the functionality “smarts” of yesterday’s PHP/CSS Sentence Auxiliary Verb Game Tutorial.

Stop Press

As of 14th May 2015 a blog posting called HTML/Javascript Homonyms Game Tutorial inspired a “tweak” to the arrangement above such that a call of the web application above such as Sense of Humour will cause the display of a lookup during the “onload” event, as required.

If this was interesting you may be interested in this too.

This entry was posted in Ajax, Data Integration, eLearning, ESL, Tutorials and tagged , , , , , , , , , , , . Bookmark the permalink.

18 Responses to Yahoo YQL Web Service JSON Thesaurus Tutorial

  1. Me English no outstanding, but had to say me like what you say. Thank you from me.

  2. Thanks for your entire efforts on this site. My mum loves engaging in investigation and it’s genuinely simple to grasp why. Many of us learn all regarding the compelling method you make beneficial tips and tricks by means of your weblog and therefore improve contribution from others on the topic matter then my daughter is without a doubt becoming educated a whole lot. Have fun with the remaining portion with the new year. You might be performing a splendid job.

  3. You completed several nice points there. I did a search on the theme and found nearly all people will agree with your blog.

  4. Hello. Great job. I did not expect this. This is a remarkable story. Thanks!

  5. hello!,I like your writing very a lot! percentage we be in contact more about your post on AOL? I require a specialist on this house to unravel my problem. Maybe that is you! Looking forward to look you.

  6. boat rental says:

    topics as well as discuss it with us. I assume it will assist a bunch of some people. Thanks

  7. I like what you guys are up also. Such clever work and reporting! Keep up the superb works guys I¡¦ve incorporated you guys to my blogroll. I think it will improve the value of my web site :)

  8. I do trust all the concepts you have presented to your post. They’re really convincing and will definitely work. Nonetheless, the posts are very brief for beginners. Could you please lengthen them a little from subsequent time? Thank you for the post.

  9. Renovation says:

    Helpful information. Lucky me I found your website unintentionally, and I’m surprised why this twist of fate did not came about earlier! I bookmarked it.

  10. Hiya, I am really glad I’ve found this information. Today bloggers publish only about gossips and net and this is actually frustrating. A good site with interesting content, this is what I need. Thank you for keeping this web site, I’ll be visiting it. Do you do newsletters? Cant find it.

  11. eliquids says:

    I’ve to express some due to this writer just for rescuing me from this particular circumstance. Proper after seeking by way of the search engines like google and receiving proposals that had been not strong, I assumed my life was gone. Existing without the answers for the challenges you have solved all through the report can be a serious case, and the kind which could have adversely damaged my entire profession if I had not found the weblog. Your very own talents and kindness in playing with nearly every thing was pretty handy. I am not certain what I would have performed if I had not found such a subject like this. I am in a position to now relish my future. Thanks so a lot for this higher good quality and results-oriented aid. I won’t hesitate to refer the website to any person who would have to have recommendations about this topic matter.

    http://asklisting.com/story.php?title=ejuice-reviews

  12. Thank you for every other informative site. Where else could I get that kind of information written in such a perfect way? I’ve a venture that I’m just now working on, and I’ve been at the look out for such info.

  13. I’m still learning from you, as I’m making my way to the top as well. I certainly enjoy reading all that is posted on your website.Keep the aarticles coming. I liked it!

  14. Great beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog web site? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea

  15. Please let me know if you’re looking for a author for your site. You have some really good articles and I believe I would be a good asset. If you ever want to take some of the load off, I’d really like to write some material for your blog in exchange for a link back to mine. Please blast me an e-mail if interested. Thank you!|

  16. I’m amazed, I must say. Rarely do I encounter a blog that’s equally educative and interesting, and let me tell you, you have hit the nail on the head. The problem is something not enough men and women are speaking intelligently about. I am very happy that I stumbled across this in my search for something regarding this.|

  17. cash says:

    Wow! Thank you! I permanently needed to write on my blog something like that. Can I take a portion of your post to my blog?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>