Skip to content

API documentation

Julien Plu edited this page Jan 23, 2017 · 2 revisions

StanfordNLPRESTAPI

Overview

REST API over Stanford CoreNLP framework to get results in NIF format. This API uses a system of profiles respecting the following pattern: extractor_language_setting. Where extractor correspond to one of the available methods. Next, language must be the language for which Stanford CoreNLP will be set, and name is the name of the setting.

Version information

Version : 4.0.0

Contact information

Contact : Julien Plu

URI scheme

Host : localhost:7000
BasePath : /v4
Schemes : HTTP

Paths

POST /coref

Description

Extract and type entities from a document by using the Coref annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • Coref

POST /date

Description

Extract and type entities from a document by using the Date annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • Date

POST /gazetteer

Description

Extract and type entities from a document by using the Gazetteer annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • Gazetteer

POST /ner

Description

Extract and type entities from a document by using the NER annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • NER

POST /number

Description

Extract and type entities from a document by using the Number annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • Number

POST /pos

Description

Extract and type entities from a document by using the POS annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • POS

GET /profile/{fullName}

Parameters

Type Name Description Schema

Path

fullName
required

Full name of a profile respecting the format: extractor_language_name

string

Responses

HTTP Code Description Schema

200

Successful response in JSON format

No Content

default

Unexpected error

Error

GET /profiles

Description

Get the list of all the available profiles.

Responses

HTTP Code Description Schema

200

Successful response in JSON format

No Content

default

Unexpected error

Error

Produces

  • application/json;charset=utf-8

Tags

  • Profiles

POST /tokenize

Description

Extract and type entities from a document by using the Tokenize annotator. In order to know which profiles are available you have to retrive the list by querying the /profiles method.

Parameters

Type Name Description Schema Default

Query

lang
optional

Language of the submited document

string

"en"

Query

setting
optional

Setting to use to extract the entities

string

"none"

Body

document
required

The document or URL (pointing to a HTML document) to process

Document

Responses

HTTP Code Description Schema

200

Successful response in NIF format

No Content

default

Unexpected error

Error

Consumes

  • application/json;charset=utf-8

Produces

  • text/turtle;charset=utf-8

  • application/json;charset=utf-8

Tags

  • Tokenize

Definitions

Document

Name Description Schema

content
optional

Content of the processed document (content XOR URL must be specified)

string

url
optional

Valid URL of a HTML document (content XOR URL must be specified)

string

Error

Name Schema

code
optional

integer(int32)

message
optional

string