GitHub - jonnywray/mod-stanford-corenlp: Vertx module for access to the Stanford CoreNLP natural language processing tools (original) (raw)

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

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