Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Vertx module for access to the Stanford CoreNLP natural language processing tools
Java
branch: master
Failed to load latest commit information.
src Implemented stop to shutdown annotation pipeline
.gitignore
LICENSE Initial commit
README.md Improved configuration documentation
pom.xml Improved configuration documentation

README.md

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

Something went wrong with that request. Please try again.