NU IT
Northwestern University Information Technology
MorphAdorner Northwestern
 
MorphAdorner Server Services: Thesaurus Service

Service name: thesaurus
Service description: Find synonyms and antonyms for a spelling.
HTTP methods allowed: GET, POST, OPTIONS
POST accepts as input: application/x-www-form-urlencoded
HTTP return codes: 200: service succeeded
400: service failed with an error

Query parameters

    media Result format. One of json, xml, html, text .
    spelling Spelling of a word.
    addSynAnt Allowed values are true to add the synonyms of the antonyms to antonym list and false to not add the antonyms.
    wordClass Word class. One of adjective, adverb, noun, verb, or no selection to search all four word classes.

Sample POST form

<form accept-charset="UTF-8" method="post" action="thesaurus"
      target="_blank"
      name="thesaurus">
<table cellpadding="0" cellspacing="5">
<tr>
<td><strong>Spelling:</strong></td>
<td><input type="text" name="spelling" size="20" value="" /></td>
</tr>
<tr>
<td><strong>Word class:</strong></td>
<td>
<select name="wordClass">
<option value="" selected="selected"></option>
<option value="adjective">adjective</option>
<option value="adverb">adverb</option>
<option value="noun">noun</option>
<option value="verb">verb</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="checkbox" name="addSynAnt" value="true" />Add synonyms of antonyms</td>
</tr>
<tr>
<td>
&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td valign="top">
<strong>Results format:</strong>
</td>
<td>
<input type="radio" name="media" value="json">JSON format</input><br />
<input type="radio" name="media" value="xml" checked="checked">XML format</input><br />
<input type="radio" name="media" value="html">HTML format</input><br />
<input type="radio" name="media" value="text">Text format</input>
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td>
<input type="submit" name="thesaurus" value="Thesaurus" />
</td>
</tr>
</table>
</form>

Output

Here is a list of synonyms and the principal antonym of "hot."

JSON output

{
  "ThesaurusResult": {
    "spelling": "hot",
    "wordClass": "",
    "addSynAnt": false,
    "synonyms": [
      {
        "synonym": [
          "blistering",
          "hot",
          "live",
          "raging",
          "red-hot",
          "spicy"
        ]
      }
    ],
    "antonyms": [
      {
        "antonym": "cold"
      }
    ]
  }
}

XML output

<ThesaurusResult>
    <spelling>hot</spelling>
    <wordClass/>
    <addSynAnt>false</addSynAnt>
    <synonyms>
        <synonym>blistering</synonym>
        <synonym>hot</synonym>
        <synonym>live</synonym>
        <synonym>raging</synonym>
        <synonym>red-hot</synonym>
        <synonym>spicy</synonym>
    </synonyms>
    <antonyms>
        <antonym>cold</antonym>
    </antonyms>
</ThesaurusResult>

HTML output (source)

<h3>
6 synonyms found for hot.
</h3>
<table border="0">
<tr><td>blistering</td></tr>
<tr><td>hot</td></tr>
<tr><td>live</td></tr>
<tr><td>raging</td></tr>
<tr><td>red-hot</td></tr>
<tr><td>spicy</td></tr>
</table>
<h3>
1 antonym found for hot.
</h3>
<table border="0">
<tr><td>cold</td></tr>
</table>

HTML output (display)

6 synonyms found for hot.

blistering
hot
live
raging
red-hot
spicy

1 antonym found for hot.

cold

Text output

6 synonyms found for hot.
blistering
hot
live
raging
red-hot
spicy
1 antonym found for hot.
cold
Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk