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

Service name: hyphenator
Service description: Hyphenate 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.

Sample POST form

<form accept-charset="UTF-8" method="post" action="hyphenator"
      target="_blank"
      name="hyphenator">
<table cellpadding="0" cellspacing="5">
<tr>
<td><strong>Spelling:</strong></td>
<td><input type="text" name="spelling" size="20" value="" /></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="hyphenate" value="Hyphenate" />
</td>
</tr>
</table>
</form>

Output

Here is sample hyphenated output for the spelling "coruscation." The JSON and XML formats echo the input spelling and provide the hyphenated version of the spelling as hyphenatedSpelling. The HTML and text versions provide the same information in a format suitable for display.

JSON output

{
  "HyphenatorResult": {
    "spelling": "coruscation",
    "hyphenatedSpelling": "co-rus-ca-tion"
  }
}

XML output

<HyphenatorResult>
    <spelling>coruscation</spelling>
    <hyphenatedSpelling>co-rus-ca-tion</hyphenatedSpelling>
</HyphenatorResult>

HTML output (source)

<h3>Hyphenation Results</h3>
<table border="0">
<tr>
<td valign="top" align="left"><strong>Spelling:</strong></td>
<td valign="top" align="left">coruscation</td>
</tr>
<tr>
<td valign="top" align="left"><strong>Hyphenated spelling:</strong></td>
<td valign="top" align="left">co-rus-ca-tion</td>
</tr>
</table>

HTML output (display)

Hyphenation Results

Spelling: coruscation
Hyphenated spelling: co-rus-ca-tion

Text output

Hyphenation Results
Spelling:	coruscation
Hyphenated spelling:	co-rus-ca-tion
Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk