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

Service name: parser
Service description: Parse sentences using Link Grammar Parser.
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 .
    text Text to be processed.
    includeInputText Allowed values are true to include the input text in the output and false to not include the input text.

Sample POST form

<form accept-charset="UTF-8" method="post" action="parser"
      target="_blank"
      name="parser">
<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>&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="parse" value="Parse" />
</td>
</tr>
</table>
</form>

Output

Here is sample parser output for the sentence "Mary had a little lamb."

JSON output

{
  "ParserResult": {
    "text": "Mary had a little lamb.",
    "parsedText": "\n    +---------------Xp---------------+\n    |            +-------Os------+   |\n    +---Wd--+-Ss-+   +IDDC+--Dmu-+   |\n    |       |    |   |    |      |   |\nLEFT-WALL Mary had.v a little lamb.n . \n\n\n     LEFT-WALL  Xp    <---Xp---->  Xp    .           \n(m)  LEFT-WALL  Wd    <---Wd---->  Wd    Mary        \n(m)  Mary       Ss    <---Ss---->  S     had.v       \n(m)  had.v      O     <---Os---->  Os    lamb.n      \n(m)  little     Dmu   <---Dmu--->  D*u   lamb.n      \n(m)  a          IDDC  <---IDDC-->  IDDC  little      \n     .          RW    <---RW---->  RW    RIGHT-WALL  \n"
  }
}

XML output

<ParserResult>
<text>Mary had a little lamb.</text>
<parsedText>
    +---------------Xp---------------+
    |            +-------Os------+   |
    +---Wd--+-Ss-+   +IDDC+--Dmu-+   |
    |       |    |   |    |      |   |
LEFT-WALL Mary had.v a little lamb.n .
     LEFT-WALL  Xp    <---Xp---->  Xp    .
(m)  LEFT-WALL  Wd    <---Wd---->  Wd    Mary
(m)  Mary       Ss    <---Ss---->  S     had.v
(m)  had.v      O     <---Os---->  Os    lamb.n
(m)  little     Dmu   <---Dmu--->  D*u   lamb.n
(m)  a          IDDC  <---IDDC-->  IDDC  little
     .          RW    <---RW---->  RW    RIGHT-WALL
</parsedText>
</ParserResult>

HTML output (source)

<p>
<pre>
    +---------------Xp---------------+
    |            +-------Os------+   |
    +---Wd--+-Ss-+   +IDDC+--Dmu-+   |
    |       |    |   |    |      |   |
LEFT-WALL Mary had.v a little lamb.n .
     LEFT-WALL  Xp    <---Xp---->  Xp    .
(m)  LEFT-WALL  Wd    <---Wd---->  Wd    Mary
(m)  Mary       Ss    <---Ss---->  S     had.v
(m)  had.v      O     <---Os---->  Os    lamb.n
(m)  little     Dmu   <---Dmu--->  D*u   lamb.n
(m)  a          IDDC  <---IDDC-->  IDDC  little
     .          RW    <---RW---->  RW    RIGHT-WALL
</pre>
</p>

HTML output (display)

    +---------------Xp---------------+
    |            +-------Os------+   |
    +---Wd--+-Ss-+   +IDDC+--Dmu-+   |
    |       |    |   |    |      |   |
LEFT-WALL Mary had.v a little lamb.n .
     LEFT-WALL  Xp    <---Xp---->  Xp    .
(m)  LEFT-WALL  Wd    <---Wd---->  Wd    Mary
(m)  Mary       Ss    <---Ss---->  S     had.v
(m)  had.v      O     <---Os---->  Os    lamb.n
(m)  little     Dmu   <---Dmu--->  D*u   lamb.n
(m)  a          IDDC  <---IDDC-->  IDDC  little
     .          RW    <---RW---->  RW    RIGHT-WALL

Text output

    +---------------Xp---------------+
    |            +-------Os------+   |
    +---Wd--+-Ss-+   +IDDC+--Dmu-+   |
    |       |    |   |    |      |   |
LEFT-WALL Mary had.v a little lamb.n .
     LEFT-WALL  Xp    <---Xp---->  Xp    .
(m)  LEFT-WALL  Wd    <---Wd---->  Wd    Mary
(m)  Mary       Ss    <---Ss---->  S     had.v
(m)  had.v      O     <---Os---->  Os    lamb.n
(m)  little     Dmu   <---Dmu--->  D*u   lamb.n
(m)  a          IDDC  <---IDDC-->  IDDC  little
     .          RW    <---RW---->  RW    RIGHT-WALL
Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk