Skip to main content

Web Service Method: Annotate from Text in NIF Format

Abstract

Web Service Method: Annotate from Text in NIF Format

Description

[text] Returns the document annotated with extracted concepts and extracted terms in NIF format.

URL: /extractor/api/annotate/nif

Request

Supported Methods

POST

GET

Content-Type

Content-Type: application/x-www-form-urlencoded

HTTP Parameters

Parameter

Type

Required

Description

includeConcepts

boolean

false

includeNamedEntities

boolean

false

includeTerms

boolean

false

informat

String

false

The format in which the input will be processed: text (default)

input

String

true

The input to be processed by the service

intype

String

false

Determines how input is accessed or retrieved: direct (default) | url

nerParameters

Array of NERConfig

false

Array of models that are used for Named Entity Recognition

outformat

String

false

The format in which the output will be serialized: turtle (default) | text | json-ld | rdfxml | ntriples | rdfa

phraseLength

Interger

false

Phrase length, default = 4

prefix

String

true

The prefix part of new URIs

projectId

Array of String

true

Thesaurus projectId

NERConfig Object

Named Entity Recognition configuration

Attribute

Type

Required

Comment

method

Method

false

Method used for Named Entity Extraction. (default: MAXIMUM_ENTROPY) RULE_BASED | MAXIMUM_ENTROPY

type

String

false

Type of Named Entity Model. Pre-defined models for MAXIMUM_ENTROPY: person, organization, location

Example for an NER Configuration
{
  "method" : "RULE_BASED",
  "type" : "https://semantic-web.com/api/type#28577"
}
ResponseDefault:

Content-type: text/plain

Status: 200 - Ok

Configure the Response Format

You can now manipulate the response format to any RDF format, as also defined here: http://docs.rdf4j.org/javadoc/2.3/org/eclipse/rdf4j/rio/RDFFormat.html

Example Formats:
  • application/rdf+xml

  • application/n-triples

  • application/x-turtle

  • application/trix

  • application/trig

In order to configure the response format, use an additional Accept header in your call.

Using an HTTP REST client, such as Postman, the call would look like this:

23901367.png