Loading...
 

Metadata enrichment API technical documentation

The enrichment micro-services are implemented as REST services and, therefore, straightforward to use: just send some text to the appropriate REST endpoint, and the service will automatically enrich the text.

Invoking the API


The base URLs for the metadata enrichment services are the following:

URL Service
http://test183.ait.co.at/rest/bglink Background link English
http://lc013.ait.co.at/rest/bglink Background link Spanish
http://test183.ait.co.at/rest/vmatch Vocabulary match (Spanish and English)


The background link service accepts the following parameters:

Parameter name Description Legal values
text The text to be enriched e.g. "Guernica was painted by Pablo Picasso"


The service produces a JSON document with an object of name Resources. The object contains a list of objects (one object per association), and each object of the list has the following elements:

The base URLs for the metadata enrichment services are the following:

Field Description
URI the URI of a Dbpedia page.
similarityScore a confidence value of the association.
surfaceForm the original text snippet from which the association was derived.
offset the starting position of the offset in the text. Useful if the original text contains many occurrences of the same mention string.

Example


The example below shows how to invoke the English service with a curl command:

Example of curl request
curl -H "Accept: application/json" -d "text=Guernica was painted by Picasso" http://test183.ait.co.at/rest/bglink


The web service returns response data as JSON (JavaScript Object Notation). An example showing how the response looks is shown below.

JSON Web Service response
{"Status":200,
 "Status_message":"Success",
 "data":{
     "Resources":[
	 {"URI":"http://dbpedia.org/resource/Guernica_(painting)",
	  "similarityScore":"0.5724195306431602",
	  "surfaceForm":"Guernica",
	  "offset":"0"},
	 {"URI":"http://dbpedia.org/resource/Pablo_Picasso",
	  "similarityScore":"0.9996545655239845",
	  "surfaceForm":"Picasso",
	  "offset":"24"}
     ]
 }
}


The vocabulary link micro-service receives raw UTF-8 text as input and produces the annotations to vocabulary concepts. The output of the service is a JSON document with the annotated elements. The service has the following parameters:

Parameter name Description Legal values
text The text to be enriched e.g. "Major Oak"
lang The language of the source text e.g. "en"


The service produces a JSON document with an object of name Resources. The object contains a list of objects (one object per association), and each object of the list has the following elements:

The base URLs for the metadata enrichment services are the following:

Field Description
URI the URI of a vocabulary concept.
vocab the name of the vocabulary


Example


The example below shows how to invoke the English service with a curl command:

Example of curl request
curl -H "Accept: application/json" -d "text=Major Oak" -d "lang=en" http://test183.ait.co.at/rest/vmatch



The web service returns response data as JSON (JavaScript Object Notation). An example showing how the response looks is shown below.

JSON Web Service response
{"Status":200,
 "Status_message":"Success",
 "data":{
     "Resources":[
	 {"URI":"http://vocabulary.locloud.eu/building_materials/xml.php?skosTema=658",
	  "vocab":"Building  Materials Thesaurus"}
     ]
 }
}