NU IT
Northwestern University Information Technology
MorphAdorner Northwestern
 
MorphAdorner Server Services: Gap Filler Service

Service name: gapfiller
Service description: Finds potential words matching a word containing missing characters.
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

    corpusConfig Corpus configuration name. In the standard distribution these are ece, eme, and ncf.
    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="gapfiller"
      target="_blank"
      name="gapfiller">
<table cellpadding="0" cellspacing="5">
<tr>
<td><strong>Spelling:</strong></td>
<td><input type="text" name="spelling" size="20" value="" /></td>
</tr>
<tr>
<td valign="top">
<strong>
Lexicon:</strong>
</td>
<td>
<input type="radio" name="corpusConfig" value="eme">Early Modern English</input><br />
<input type="radio" name="corpusConfig" value="ece">Eighteen Century English</input><br />
<input type="radio" name="corpusConfig" value="ncf" checked="checked">Nineteenth Century Fiction</input>
</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="fillgaps" value="Fill gaps" />
</td>
</tr>
</table>
</form>

Output

Here is sample output for the partial word "re?ate" where the "?" indicates an unknown character. We use the eme (Early Modern English) lexicon to locate potential matches. You may also use the Unicode black circle character \u25cf to specify a gap character. The output uses the black circle to display gap characters even when a "?" is used in the input word.

In the JSON and XML output formats, the GapFillerResult echoes the input spelling (with the "?" replaced by the Unicode black circle character \u25cf) and the corpusConfig name. The suggestions container wraps a list of suggestion entries, each of which is a single suggested gap-filled spelling. The HTML and text versions provide just these suggestions in a format suitable for display.

JSON output

{
  "GapFillerResult": {
    "spelling": "re●ate",
    "corpusConfig": "eme",
    "suggestions": [
      {
        "suggestion": [
          "rebate",
          "relate",
          "renate"
        ]
      }
    ]
  }
}

XML output

<GapFillerResult>
    <spelling>re●ate</spelling>
    <corpusConfig>eme</corpusConfig>
    <suggestions>
        <suggestion>rebate</suggestion>
        <suggestion>relate</suggestion>
        <suggestion>renate</suggestion>
    </suggestions>
</GapFillerResult>

HTML output (source)

<h3>3 suggestions found.</h3>
<table border="0">
<tr>
<td valign="top" align="left">rebate</td>
</tr>
<tr>
<td valign="top" align="left">relate</td>
</tr>
<tr>
<td valign="top" align="left">renate</td>
</tr>
</table>

HTML output (display)

3 suggestions found.

rebate
relate
renate

Text output

3 suggestions found.
rebate
relate
renate
Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk