NU IT
Northwestern University Information Technology
MorphAdorner Northwestern
 
MorphAdorner Server Services: Adorn Plain Text Service

Service name: partofspeechtagger
Service description: Adorn words with their parts of speech.
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 .
    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.
    outputReg Output standardized spelling in TEI XML format. Allowed values are true to output the standard spelling, false to not output the standard spelling.
    XML output style. Select outputPlainXML for plain XML, outputTEI for TEI format XML, or outputTCF for WebLicht TCF format XML.

Sample POST form

<form accept-charset="UTF-8" method="post" action="partofspeechtagger"
      target="_blank"
      name="postagger">
<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 />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="xmlOutputType" value="outputPlainXML" checked="checked">Plain XML</input><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="xmlOutputType" value="outputTEI">Fragmentary TEI format XML</input><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="outputReg" value="false" />Add reg= attribute for standard spelling<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="xmlOutputType" value="outputTCF">WebLicht TCF format XML</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="adorn" value="Adorn" />
</td>
</tr>
</table>
</form>

Output

Here we adorn the first two sentences of Sarah Hale's poem "Mary had a little lamb."

Mary had a little lamb,
whose fleece was white as snow.
And everywhere that Mary went,
the lamb was sure to go.

The JSON and XML PartOfSpeechTaggerResult echoes the input text and the corpusConfig. The sentences container wraps a sequence of sentence entries each of which represents a single parsed sentence from the input text. Each sentence contains a sequence of token entries representing the words and punctuation in the sentence. Following this is an adornedSentences container which contains a sequence of adornedSentence entries. Each adornedSentence contains a sequence of adornedWord entries containing the morphological adornments.

For XML format output, the alternate output formats provide different formatting but the same basic information.

The HTML and text versions provide tabular versions of the adorned sentences.

JSON output

{
  "PartOfSpeechTaggerResult": {
    "text": "Mary had a little lamb,  whose fleece was white as snow.  And everywhere that Mary went,  the lamb was sure to go.",
    "corpusConfig": "ncf",
    "sentences": [
      {
        "sentence": [
          {
            "token": [
              "Mary",
              "had",
              "a",
              "little",
              "lamb",
              ",",
              "whose",
              "fleece",
              "was",
              "white",
              "as",
              "snow",
              "."
            ]
          },
          {
            "token": [
              "And",
              "everywhere",
              "that",
              "Mary",
              "went",
              ",",
              "the",
              "lamb",
              "was",
              "sure",
              "to",
              "go",
              "."
            ]
          }
        ]
      }
    ],
    "adornedSentences": [
      {
        "adornedSentence": [
          {
            "adornedWord": [
              {
                "token": "Mary",
                "spelling": "Mary",
                "standardSpelling": "Mary",
                "lemmata": "Mary",
                "partsOfSpeech": "np1"
              },
              {
                "token": "had",
                "spelling": "had",
                "standardSpelling": "had",
                "lemmata": "have",
                "partsOfSpeech": "vhd"
              },
              {
                "token": "a",
                "spelling": "a",
                "standardSpelling": "a",
                "lemmata": "a",
                "partsOfSpeech": "dt"
              },
              {
                "token": "little",
                "spelling": "little",
                "standardSpelling": "little",
                "lemmata": "little",
                "partsOfSpeech": "j"
              },
              {
                "token": "lamb",
                "spelling": "lamb",
                "standardSpelling": "lamb",
                "lemmata": "lamb",
                "partsOfSpeech": "n1"
              },
              {
                "token": ",",
                "spelling": ",",
                "standardSpelling": ",",
                "lemmata": ",",
                "partsOfSpeech": ","
              },
              {
                "token": "whose",
                "spelling": "whose",
                "standardSpelling": "whose",
                "lemmata": "who",
                "partsOfSpeech": "r-crq"
              },
              {
                "token": "fleece",
                "spelling": "fleece",
                "standardSpelling": "fleece",
                "lemmata": "fleece",
                "partsOfSpeech": "n1"
              },
              {
                "token": "was",
                "spelling": "was",
                "standardSpelling": "was",
                "lemmata": "be",
                "partsOfSpeech": "vbds"
              },
              {
                "token": "white",
                "spelling": "white",
                "standardSpelling": "white",
                "lemmata": "white",
                "partsOfSpeech": "j-jn"
              },
              {
                "token": "as",
                "spelling": "as",
                "standardSpelling": "as",
                "lemmata": "as",
                "partsOfSpeech": "c-acp"
              },
              {
                "token": "snow",
                "spelling": "snow",
                "standardSpelling": "snow",
                "lemmata": "snow",
                "partsOfSpeech": "n1"
              },
              {
                "token": ".",
                "spelling": ".",
                "standardSpelling": ".",
                "lemmata": ".",
                "partsOfSpeech": "."
              }
            ]
          },
          {
            "adornedWord": [
              {
                "token": "And",
                "spelling": "And",
                "standardSpelling": "And",
                "lemmata": "and",
                "partsOfSpeech": "cc"
              },
              {
                "token": "everywhere",
                "spelling": "everywhere",
                "standardSpelling": "everywhere",
                "lemmata": "everywhere",
                "partsOfSpeech": "av"
              },
              {
                "token": "that",
                "spelling": "that",
                "standardSpelling": "that",
                "lemmata": "that",
                "partsOfSpeech": "cst"
              },
              {
                "token": "Mary",
                "spelling": "Mary",
                "standardSpelling": "Mary",
                "lemmata": "Mary",
                "partsOfSpeech": "np1"
              },
              {
                "token": "went",
                "spelling": "went",
                "standardSpelling": "went",
                "lemmata": "go",
                "partsOfSpeech": "vvd"
              },
              {
                "token": ",",
                "spelling": ",",
                "standardSpelling": ",",
                "lemmata": ",",
                "partsOfSpeech": ","
              },
              {
                "token": "the",
                "spelling": "the",
                "standardSpelling": "the",
                "lemmata": "the",
                "partsOfSpeech": "dt"
              },
              {
                "token": "lamb",
                "spelling": "lamb",
                "standardSpelling": "lamb",
                "lemmata": "lamb",
                "partsOfSpeech": "n1"
              },
              {
                "token": "was",
                "spelling": "was",
                "standardSpelling": "was",
                "lemmata": "be",
                "partsOfSpeech": "vbds"
              },
              {
                "token": "sure",
                "spelling": "sure",
                "standardSpelling": "sure",
                "lemmata": "sure",
                "partsOfSpeech": "j"
              },
              {
                "token": "to",
                "spelling": "to",
                "standardSpelling": "to",
                "lemmata": "to",
                "partsOfSpeech": "pc-acp"
              },
              {
                "token": "go",
                "spelling": "go",
                "standardSpelling": "go",
                "lemmata": "go",
                "partsOfSpeech": "vvi"
              },
              {
                "token": ".",
                "spelling": ".",
                "standardSpelling": ".",
                "lemmata": ".",
                "partsOfSpeech": "."
              }
            ]
          }
        ]
      }
    ],
    "outputTEI": false,
    "outputReg": false,
    "outputTCF": false
  }
}

XML output

<?xml version="1.0"?>
<PartOfSpeechTaggerResult>
    <text>Mary had a little lamb,  whose fleece was white as snow.  And everywhere that Mary went,  the lamb was sure to go.</text>
    <corpusConfig>ncf</corpusConfig>
    <sentences>
        <sentence>
            <token>Mary</token>
            <token>had</token>
            <token>a</token>
            <token>little</token>
            <token>lamb</token>
            <token>,</token>
            <token>whose</token>
            <token>fleece</token>
            <token>was</token>
            <token>white</token>
            <token>as</token>
            <token>snow</token>
            <token>.</token>
        </sentence>
        <sentence>
            <token>And</token>
            <token>everywhere</token>
            <token>that</token>
            <token>Mary</token>
            <token>went</token>
            <token>,</token>
            <token>the</token>
            <token>lamb</token>
            <token>was</token>
            <token>sure</token>
            <token>to</token>
            <token>go</token>
            <token>.</token>
        </sentence>
    </sentences>
    <adornedSentences>
        <adornedSentence>
            <adornedWord>
                <token>Mary</token>
                <spelling>Mary</spelling>
                <standardSpelling>Mary</standardSpelling>
                <lemmata>Mary</lemmata>
                <partsOfSpeech>np1</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>had</token>
                <spelling>had</spelling>
                <standardSpelling>had</standardSpelling>
                <lemmata>have</lemmata>
                <partsOfSpeech>vhd</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>a</token>
                <spelling>a</spelling>
                <standardSpelling>a</standardSpelling>
                <lemmata>a</lemmata>
                <partsOfSpeech>dt</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>little</token>
                <spelling>little</spelling>
                <standardSpelling>little</standardSpelling>
                <lemmata>little</lemmata>
                <partsOfSpeech>j</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>lamb</token>
                <spelling>lamb</spelling>
                <standardSpelling>lamb</standardSpelling>
                <lemmata>lamb</lemmata>
                <partsOfSpeech>n1</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>,</token>
                <spelling>,</spelling>
                <standardSpelling>,</standardSpelling>
                <lemmata>,</lemmata>
                <partsOfSpeech>,</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>whose</token>
                <spelling>whose</spelling>
                <standardSpelling>whose</standardSpelling>
                <lemmata>who</lemmata>
                <partsOfSpeech>r-crq</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>fleece</token>
                <spelling>fleece</spelling>
                <standardSpelling>fleece</standardSpelling>
                <lemmata>fleece</lemmata>
                <partsOfSpeech>n1</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>was</token>
                <spelling>was</spelling>
                <standardSpelling>was</standardSpelling>
                <lemmata>be</lemmata>
                <partsOfSpeech>vbds</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>white</token>
                <spelling>white</spelling>
                <standardSpelling>white</standardSpelling>
                <lemmata>white</lemmata>
                <partsOfSpeech>j-jn</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>as</token>
                <spelling>as</spelling>
                <standardSpelling>as</standardSpelling>
                <lemmata>as</lemmata>
                <partsOfSpeech>c-acp</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>snow</token>
                <spelling>snow</spelling>
                <standardSpelling>snow</standardSpelling>
                <lemmata>snow</lemmata>
                <partsOfSpeech>n1</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>.</token>
                <spelling>.</spelling>
                <standardSpelling>.</standardSpelling>
                <lemmata>.</lemmata>
                <partsOfSpeech>.</partsOfSpeech>
            </adornedWord>
        </adornedSentence>
        <adornedSentence>
            <adornedWord>
                <token>And</token>
                <spelling>And</spelling>
                <standardSpelling>And</standardSpelling>
                <lemmata>and</lemmata>
                <partsOfSpeech>cc</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>everywhere</token>
                <spelling>everywhere</spelling>
                <standardSpelling>everywhere</standardSpelling>
                <lemmata>everywhere</lemmata>
                <partsOfSpeech>av</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>that</token>
                <spelling>that</spelling>
                <standardSpelling>that</standardSpelling>
                <lemmata>that</lemmata>
                <partsOfSpeech>cst</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>Mary</token>
                <spelling>Mary</spelling>
                <standardSpelling>Mary</standardSpelling>
                <lemmata>Mary</lemmata>
                <partsOfSpeech>np1</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>went</token>
                <spelling>went</spelling>
                <standardSpelling>went</standardSpelling>
                <lemmata>go</lemmata>
                <partsOfSpeech>vvd</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>,</token>
                <spelling>,</spelling>
                <standardSpelling>,</standardSpelling>
                <lemmata>,</lemmata>
                <partsOfSpeech>,</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>the</token>
                <spelling>the</spelling>
                <standardSpelling>the</standardSpelling>
                <lemmata>the</lemmata>
                <partsOfSpeech>dt</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>lamb</token>
                <spelling>lamb</spelling>
                <standardSpelling>lamb</standardSpelling>
                <lemmata>lamb</lemmata>
                <partsOfSpeech>n1</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>was</token>
                <spelling>was</spelling>
                <standardSpelling>was</standardSpelling>
                <lemmata>be</lemmata>
                <partsOfSpeech>vbds</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>sure</token>
                <spelling>sure</spelling>
                <standardSpelling>sure</standardSpelling>
                <lemmata>sure</lemmata>
                <partsOfSpeech>j</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>to</token>
                <spelling>to</spelling>
                <standardSpelling>to</standardSpelling>
                <lemmata>to</lemmata>
                <partsOfSpeech>pc-acp</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>go</token>
                <spelling>go</spelling>
                <standardSpelling>go</standardSpelling>
                <lemmata>go</lemmata>
                <partsOfSpeech>vvi</partsOfSpeech>
            </adornedWord>
            <adornedWord>
                <token>.</token>
                <spelling>.</spelling>
                <standardSpelling>.</standardSpelling>
                <lemmata>.</lemmata>
                <partsOfSpeech>.</partsOfSpeech>
            </adornedWord>
        </adornedSentence>
    </adornedSentences>
    <outputTEI>false</outputTEI>
    <outputReg>false</outputReg>
    <outputTCF>false</outputTCF>
</PartOfSpeechTaggerResult>

HTML output (source)

<h3>26 words in 2 sentences found.
</h3>
<table border="0">
<tbody><tr>
<th align="left">S#</th><th align="left">W#</th><th align="left">Spelling</th><th align="left">Pos</th><th align="left">Standard</th><th align="left">Lemma</th></tr>
<tr><td>1</td><td>1</td><td>Mary</td><td>np1</td><td>Mary</td><td>Mary</td></tr>
<tr><td>1</td><td>2</td><td>had</td><td>vhd</td><td>had</td><td>have</td></tr>
<tr><td>1</td><td>3</td><td>a</td><td>dt</td><td>a</td><td>a</td></tr>
<tr><td>1</td><td>4</td><td>little</td><td>j</td><td>little</td><td>little</td></tr>
<tr><td>1</td><td>5</td><td>lamb</td><td>n1</td><td>lamb</td><td>lamb</td></tr>
<tr><td>1</td><td>6</td><td>,</td><td>,</td><td>,</td><td>,</td></tr>
<tr><td>1</td><td>7</td><td>whose</td><td>r-crq</td><td>whose</td><td>who</td></tr>
<tr><td>1</td><td>8</td><td>fleece</td><td>n1</td><td>fleece</td><td>fleece</td></tr>
<tr><td>1</td><td>9</td><td>was</td><td>vbds</td><td>was</td><td>be</td></tr>
<tr><td>1</td><td>10</td><td>white</td><td>j-jn</td><td>white</td><td>white</td></tr>
<tr><td>1</td><td>11</td><td>as</td><td>c-acp</td><td>as</td><td>as</td></tr>
<tr><td>1</td><td>12</td><td>snow</td><td>n1</td><td>snow</td><td>snow</td></tr>
<tr><td>1</td><td>13</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>
<tr><td>2</td><td>1</td><td>And</td><td>cc</td><td>And</td><td>and</td></tr>
<tr><td>2</td><td>2</td><td>everywhere</td><td>av</td><td>everywhere</td><td>everywhere</td></tr>
<tr><td>2</td><td>3</td><td>that</td><td>cst</td><td>that</td><td>that</td></tr>
<tr><td>2</td><td>4</td><td>Mary</td><td>np1</td><td>Mary</td><td>Mary</td></tr>
<tr><td>2</td><td>5</td><td>went</td><td>vvd</td><td>went</td><td>go</td></tr>
<tr><td>2</td><td>6</td><td>,</td><td>,</td><td>,</td><td>,</td></tr>
<tr><td>2</td><td>7</td><td>the</td><td>dt</td><td>the</td><td>the</td></tr>
<tr><td>2</td><td>8</td><td>lamb</td><td>n1</td><td>lamb</td><td>lamb</td></tr>
<tr><td>2</td><td>9</td><td>was</td><td>vbds</td><td>was</td><td>be</td></tr>
<tr><td>2</td><td>10</td><td>sure</td><td>j</td><td>sure</td><td>sure</td></tr>
<tr><td>2</td><td>11</td><td>to</td><td>pc-acp</td><td>to</td><td>to</td></tr>
<tr><td>2</td><td>12</td><td>go</td><td>vvi</td><td>go</td><td>go</td></tr>
<tr><td>2</td><td>13</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>
</tbody>
</table>

HTML output (display)

26 words in 2 sentences found.

S#W#SpellingPosStandardLemma
11Marynp1MaryMary
12hadvhdhadhave
13adtaa
14littlejlittlelittle
15lambn1lamblamb
16,,,,
17whoser-crqwhosewho
18fleecen1fleecefleece
19wasvbdswasbe
110whitej-jnwhitewhite
111asc-acpasas
112snown1snowsnow
113....
21AndccAndand
22everywhereaveverywhereeverywhere
23thatcstthatthat
24Marynp1MaryMary
25wentvvdwentgo
26,,,,
27thedtthethe
28lambn1lamblamb
29wasvbdswasbe
210surejsuresure
211topc-acptoto
212govvigogo
213....

Text output

26 words in 2 sentences found.
S#	W#	Spelling	Pos	Standard	Lemma
1	1	Mary	np1	Mary	Mary
1	2	had	vhd	had	have
1	3	a	dt	a	a
1	4	little	j	little	little
1	5	lamb	n1	lamb	lamb
1	6	,	,	,	,
1	7	whose	r-crq	whose	who
1	8	fleece	n1	fleece	fleece
1	9	was	vbds	was	be
1	10	white	j-jn	white	white
1	11	as	c-acp	as	as
1	12	snow	n1	snow	snow
1	13	.	.	.	.
2	1	And	cc	And	and
2	2	everywhere	av	everywhere	everywhere
2	3	that	cst	that	that
2	4	Mary	np1	Mary	Mary
2	5	went	vvd	went	go
2	6	,	,	,	,
2	7	the	dt	the	the
2	8	lamb	n1	lamb	lamb
2	9	was	vbds	was	be
2	10	sure	j	sure	sure
2	11	to	pc-acp	to	to
2	12	go	vvi	go	go
2	13	.	.	.	.
Home
 
Announcements and News
 
Documentation
 
Download MorphAdorner
 
Glossary
 
Helpful References
 
Licenses
 
Server
 
Talks
 
Tech Talk