NU IT
Northwestern University Information Technology
MorphAdorner Northwestern
 
MorphAdorner Server Services: Name Recognizer Service

Service name: namerecognizer
Service description: Recognize names and places in text.
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.
    includeInputText Allowed values are true to include the input text in the output and false to not include the input text.
    media Result format. One of json, xml, html, text .
    text Text to be processed.

Sample POST form

<form accept-charset="UTF-8" method="post" action="namerecognizer"
      target="_blank"
      name="namerecognizer">
<table cellpadding="0" cellspacing="5">
<tr>
<td><strong>Text:</strong></td>
<td colspan="2">
<textarea name="text" rows="15" cols="76"></textarea>
</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>
<input type="checkbox" name="includeInputText" value="true"
       checked="checked"/>
Include input text in results
</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 colspan="2">
<input type="submit" name="getnames" value="Get names" />
</td>
</tr>
</table>
</form>

Output

We look for names in the following short section of text taken from a Northwestern University web page discussing the early history of the University.

In 1853, the founders purchased a 379-acre tract of land on the shore of Lake Michigan 12 miles north of Chicago. They established a campus and developed the land near it, naming the surrounding town Evanston in honor of one of the University's founders, John Evans. After completing its first building in 1855, Northwestern began classes that fall with two faculty members and 10 students.

The JSON and XML NameRecognizerResult echoes the input text. The HTML and text versions provide displayable versions of the name and place lists. Note that the implementation is rather primitive and frequently fails to distinguish names from places.

JSON output

{
  "NameRecognizerResult": {
    "text": "In 1853, the founders purchased a 379-acre tract of land on the  shore of Lake Michigan 12 miles north of Chicago. They  established a campus and developed the land near it, naming the  surrounding town Evanston in honor of one of the University's  founders, John Evans. After completing its first building in  1855, Northwestern began classes that fall with two faculty  members and 10 students.",
    "corpusConfig": "ncf",
    "personNames": [
      {
        "@class": "tree-set",
        "personName": [
          "John Evans",
          "Lake Michigan",
          "Northwestern"
        ]
      }
    ],
    "placeNames": [
      {
        "@class": "tree-set",
        "placeName": [
          "Chicago",
          "Evanston"
        ]
      }
    ]
  }
}

XML output

<NameRecognizerResult>
    <text>In 1853, the founders purchased a 379-acre tract of land on the shore of Lake Michigan 12 miles north of Chicago. They established a campus and developed the land near it, naming the surrounding town Evanston in honor of one of the University's founders, John Evans. After completing its first building in 1855, Northwestern began classes that fall with two faculty members and 10 students.</text>
    <corpusConfig>ncf</corpusConfig>
    <personNames class="tree-set">
        <personName>John Evans</personName>
        <personName>Lake Michigan</personName>
        <personName>Northwestern</personName>
    </personNames>
    <placeNames class="tree-set">
        <placeName>Chicago</placeName>
        <placeName>Evanston</placeName>
    </placeNames>
</NameRecognizerResult>

HTML output (source)

<h3>
3 person names found.
</h3>
<table border="0">
<tr><td>John Evans</td></tr>
<tr><td>Lake Michigan</td></tr>
<tr><td>Northwestern</td></tr>
</table>
<h3>
2 place names found.
</h3>
<table border="0">
<tr><td>Chicago</td></tr>
<tr><td>Evanston</td></tr>
</table>

HTML output (display)

3 person names found.

John Evans
Lake Michigan
Northwestern

2 place names found.

Chicago
Evanston

Text output

3 person names found.
John Evans
Lake Michigan
Northwestern
2 place names found.
Chicago
Evanston
Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk