Web Service Method: Annotate from Text in NIF Format in JSON
Web Service Method: Annotate from Text in NIF Format in JSON
Description |
---|
[text] Returns the document annotated with extracted concepts and extracted terms in NIF format. |
URL: /extractor/api/annotate/nif
Supported Methods |
---|
POST |
Content-Type: application/json
Attribute | Type | Required | Comment |
---|---|---|---|
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 | Integer | false | Phrase length, default = 4 |
prefix | String | true | The prefix part of new URIs |
projectId | Array of String | true | Thesaurus projectId |
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 |
{ "input" : "some input", "nerParameters" : [ { "method" : "MAXIMUM_ENTROPY", "type" : "https://semantic-web.com/api/type#10113" }, { "method" : "RULE_BASED", "type" : "https://semantic-web.com/api/type#491" }, { "method" : "MAXIMUM_ENTROPY", "type" : "https://semantic-web.com/api/type#16327" } ], "informat" : "some informat", "prefix" : "some prefix", "includeTerms" : false, "includeNamedEntities" : true, "includeConcepts" : false, "outformat" : "some outformat", "projectId" : [ "some projectId", "some projectId" ], "intype" : "some intype" }
Content-type: text/plain
Status: 200 - Ok
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
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: