The following web pages contain various tutorials. Use them as a reference only.
For this project, you will use the Dictionary Service provided by services.aonaware.com available at DictService. In particular, you will use the HTTP GET request with dictid=wn (WordNet 2.0).
Your HTML page should have three sections: an input textarea, a text display section, and a dictionary description section. At the beginning, the user writes an English text inside the input textarea. When she presses a button, the web page displays the content of the input textarea in the text display section. When the user moves the mouse on top of a word in the text display section, the browser sends a query to the DictService and displays the result (the word description) in the dictionary description section.
The input textarea may look like:
<form> <textarea id="text" rows="10" cols="100"></textarea><br/> <input type="button" onclick="process();" value="Process Text"> </form>You need to write a function process() that reads the content of the textarea using document.getElementById("text").value, and inserts it into the text display section.
<form> <span onmouseover="describe('computer')">computer</span> <span onmouseover="describe('science')">science</span> </form>where the function describe sends an HTTP GET request to the DictService and displays the result in the dictionary description section. To generate these wrapped words, you need to split the text of the textarea into words (using split()) and wrap each word with the appropriate HTML code.
Note that the interaction between your HTML page and the DictService should be done asynchronously, using the XMLHttpRequest object, without redrawing the web page.
Use the form below to submit your HTML file. You may submit your file as many times as you like, but only the most recently submitted file will be retained and evaluated.
Last modified: 01/24/08 by Leonidas Fegaras