Skip to content

Files

Latest commit

5b49a27 · Dec 22, 2013

History

History
60 lines (43 loc) · 1.41 KB

README.md

File metadata and controls

60 lines (43 loc) · 1.41 KB

mod-stanford-corenlp

Vertx module for access to the Stanford CoreNLP natural language processing tools

Configuration

The module takes a JSON object for configuration.

{
    "address": <address>,
    "annotators": <annotator list>
}

where the parameters are

  • address: The main address for the module. Every module has a main address. Defaults to jonnywray.corenlp
  • annotators: List of annotators in the format expected by the StanfordCoreNLP object. Is required but no default specified
  • any number of other parameters that are passed directly to the StanfordCoreNLP configuration as the annotator options.

Operations

The module currently supports one operation, annotate and takes a JSON object of the following form

{
  "action" : "annotate",
  "text" : <text to be annotated>
}

If the annotation operation is successful the following will be returned

{
  "status" : "ok" ,
  "root" : {
        <JSON object representing the annotated text>
  }
}

The specific form of the output depends on the annotators configured and is constructed automatically from the internal XML representation of the annotation data

Errors

For all operations if an error occurs the following response is returned

{
    "status": "error",
    "message": <message>
}

where message is the error message