SlideShare a Scribd company logo
1 of 55
Download to read offline
●
●
●
●
●
●
●
●
●
●
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
<http://example.org/document/1#char=0,11>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "the content"^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "11"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
●
●
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
<http://example.org/document/1#char=0,21>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "We talk about Xiamen."^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "21"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
<http://example.org/document/1#char=14,20>
a nif:String , nif:RFC5147String ;
nif:referenceContext <http://example.org/document/1#char=0,3680> ;
nif:anchorOf "Xiamen"^^xsd:string ;
nif:beginIndex "14"^^xsd:nonNegativeInteger ;
nif:endIndex "20"^^xsd:nonNegativeInteger ;
nif:wasConvertedFrom <http://example.org?t=url&f=html&i=http://somewebpage.
com#char=0,2820> ;
a nif:Word, nif:Phrase ;
itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> .
itsrdf:taClassRef <http://dbpedia.org/ontology/City> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/Settlement> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/PopulatedPlace> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/Place> ;
●
●
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
<http://example.org/document/1#char=0,21>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "We talk about Xiamen."^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "21"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
<http://example.org/document/1#char=14,20>
a nif:String , nif:RFC5147String ;
nif:referenceContext <http://example.org/document/1#char=0,3680> ;
nif:anchorOf "Xiamen"^^xsd:string ;
nif:beginIndex "14"^^xsd:nonNegativeInteger ;
nif:endIndex "20"^^xsd:nonNegativeInteger ;
nif:wasConvertedFrom <http://example.org?t=url&f=html&i=http://somewebpage.
com#char=0,2820> ;
a nif:Word, nif:Phrase ;
itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> .
itsrdf:taClassRef <http://dbpedia.org/ontology/City> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/Settlement> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/PopulatedPlace> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/Place> ;
●
●
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
<http://example.org/document/1#char=0,21>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "We talk about Xiamen."^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "21"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
<http://example.org/document/1#char=14,20>
a nif:String , nif:RFC5147String , nif:Word, nif:Phrase ;
nif:referenceContext <http://example.org/document/1#char=0,3680> ;
nif:anchorOf "Xiamen"^^xsd:string ;
nif:beginIndex "14"^^xsd:nonNegativeInteger ;
nif:endIndex "20"^^xsd:nonNegativeInteger ;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
nif:wasConvertedFrom <http://example.com/?informat=html&intype=url&input=http:
//differentday.blogspot.com/2007_01_01_archive.html/&xpath=/html/body[1]/h2[1]
/span[1]/text()[1]>.
●
●
●
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
<http://example.org/document/1#char=0,21>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "We talk about Xiamen."^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "21"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
<http://example.org/document/1#char=14,20>
a nif:String , nif:RFC5147String , nif:Word, nif:Phrase ;
nif:referenceContext <http://example.org/document/1#char=0,3680> ;
nif:anchorOf "Xiamen"^^xsd:string ;
nif:beginIndex "14"^^xsd:nonNegativeInteger ;
nif:endIndex "20"^^xsd:nonNegativeInteger ;
itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> .
itsrdf:taClassRef <http://dbpedia.org/ontology/City> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/PopulatedPlace> ;
itsrdf:taClassRef <http://dbpedia.org/ontology/Place> ;
●
●
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
// NIF document for processing - named entity extraction.
<http://example.org/document/1#char=0,21>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "We talk about Xiamen."^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "21"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
// Detected entity mention linked with its DBpedia representation and ontology class.
<http://example.org/document/1#char=14,20>
a nif:String , nif:RFC5147String , nif:Word, nif:Phrase ;
nif:referenceContext <http://example.org/document/1#char=0,3680> ;
nif:anchorOf "Xiamen"""^^xsd:string ;
nif:beginIndex "14"^^xsd:nonNegativeInteger ;
nif:endIndex "20"^^xsd:nonNegativeInteger ;
itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> .
itsrdf:taClassRef <http://dbpedia.org/ontology/City> ;
●
●
●
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
// Input NIF document for translation.
<http://example.org/document/1#char=0,17>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "text to translate"@en;
itsrdf:translate "yes" ;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "17"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
// Translated document in NIF.
<http://example.org/document/1#char=0,17>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "text to translate"@en;
itsrdf:target "translated text"@fr ;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "17"^^xsd:nonNegativeInteger;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
●
●
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
// Input NIF document for translation.
<http://example.org/document/1#char=0,17>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "text to translate"@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "3680"^^xsd:nonNegativeInteger.
// String within the document intended for translation.
<http://example.org/document/1#char=0,4>
a nif:String , nif:RFC5147String ;
nif:anchorOf "text"@en;
itsrdf:translate "yes" ;
nif:referenceContext <http://example.org/document/1#char=0,17>.
// String within the document not intended for translation.
<http://example.org/document/1#char=8,17>
a nif:String , nif:RFC5147String ;
nif:anchorOf "translate"@en;
itsrdf:translate "no" ;
nif:referenceContext <http://example.org/document/1#char=0,17>.
●
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix vt: <http://www.w3.org/2005/11/its/rdf#> .
// Input NIF document for translation.
<http://example.org/document/en#char=0,55>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "My destination is only a 'hop-and-a-skip' from my home."@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "55"^^xsd:nonNegativeInteger;
itsrdf:translate "yes" .
// NIF document containing the translated content.
<http://example.org/document/de#char=0,57>
a nif:String , nif:Context , nif:RFC5147String ;
nif:anchorOf "Mein Ziel ist nur ein 'Katzen-sprung' von meinem Zuhause."@de;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "57"^^xsd:nonNegativeInteger;
// Link between the translated document and the source.
<http://example.org/document/en#char=0,55>
vt:translatedAs <http://example.org/document/de#char=0,57>.
●
●
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
// Input NIF document to be processed.
<http://example.org/document/1#char=0,131>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "A computer is a general purpose device that can be programmed to
carry out a set of arithmetic or logical operations automatically."@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "131"^^xsd:nonNegativeInteger.
// Annotated terminology in NIF.
<http://example.org/document/1#char=2,10>
a nif:String , nif:RFC5147String ;
nif:anchorOf "computer"@en;
itsrdf:termInfoRef <#1431254> ;
itsrdf:term "yes" ;
nif:referenceContext <http://example.org/document/1#char=0,131>.
●
●
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
// The NIF document.
<http://example.org/document/1#char=0,59>
a nif:String , nif:Context , nif:RFC5147String ;
nif:isString "Gringoire, a practical philosopher of the streets of Paris."@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "59"^^xsd:nonNegativeInteger.
// Annotated entity mention with link to DBpedia resource.
<http://example.org/document/1#char=0,9>
a nif:String , nif:RFC5147String ;
nif:anchorOf "Gringoire"@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "9"^^xsd:nonNegativeInteger.
itsrdf:taIdentRef <http://dbpedia.org/resource/Pierre_Gringoire> ;
nif:referenceContext <http://example.org/document/1#char=0,59>.
// Visualised NIF: HTML + microdata.
<p><span about="http://dbpedia.org/resource/Pierre_Gringoire" property="schema:name"
>Gringoire</span>, a practical philosopher of the streets of Paris.</p>
●
●
●
// Annotated entity mention with link to a DBpedia resource.
<http://example.org/document/1#char=0,6>
a nif:String , nif:RFC5147String ;
nif:anchorOf "Berlin"@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "6"^^xsd:nonNegativeInteger;
itsrdf:taIdentRef <http://dbpedia.org/resource/Berlin> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
// Entity enriched with geo-coordinates.
<http://example.org/document/1#char=0,6>
a nif:String , nif:RFC5147String ;
nif:anchorOf "Berlin"@en;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "6"^^xsd:nonNegativeInteger;
itsrdf:taIdentRef <http://dbpedia.org/resource/Berlin>;
geo:lat "52.516666";
geo:long "13.383333" .
●
●
> POST /e-link/?f=turtle&t=direct HTTP/1.1
> Host: sandbox.freme-project.eu
> Accept: application/rdf+xml
>
> ... data for conversion ...
< HTTP/1.1 200 OK
< Content-Type: application/rdf+xml
<
< ... results converted in rdf/xml ...
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
// The NIF context document.
<http://example.org/document/1#char=0,40>
a nif:String, nif:Context, nif:RFC5147String ;
nif:isString "My favourite actress in Natalie Portman."^^xsd:string ;
nif:beginIndex "0"^^xsd:nonNegativeInteger ;
nif:endIndex "40"^^xsd:nonNegativeInteger ;
nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
// Annotated entity mention with link to a DBpedia resource.
<http://example.org/document/1#char=24,39>
a nif:String, nif:RFC5147String ;
nif:anchorOf "Natalie Portman"@en;
nif:beginIndex "24"^^xsd:nonNegativeInteger;
nif:endIndex "39"^^xsd:nonNegativeInteger;
itsrdf:taIdentRef <http://dbpedia.org/resource/Natalie_Portman> ;
nif:referenceContext <http://example.org/document/1#char=0,40> .
●
●
●
<http://example.org/document/1#char=0,40> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String> .
<http://example.org/document/1#char=0,40> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context> .
<http://example.org/document/1#char=0,40> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String> .
<http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#isString> "My favourite actress in Natalie Portman." .
<http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#beginIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .
<http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#endIndex> "40"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .
<http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#sourceUrl> <http://differentday.blogspot.com/2007_01_01_archive.html> .
<http://example.org/document/1#char=24,39> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String> .
<http://example.org/document/1#char=24,39> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String> .
<http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#anchorOf> "Natalie Portman"@en .
<http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#beginIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .
<http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#endIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> .
<http://example.org/document/1#char=24,39> <http://www.w3.org/2005/11/its/rdf#taIdentRef> <http://dbpedia.org/resource/Natalie_Portman> .
<http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#referenceContext> <http://example.org/document/1#char=0,40> .
●
●
●
●
●
●
<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nif="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#"
xmlns:itsrdf="http://www.w3.org/2005/11/its/rdf#">
<rdf:Description rdf:about="http://example.org/document/1#char=0,40">
<rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
<rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context"/>
<rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
<nif:isString rdf:datatype="http://www.w3.org/2001/XMLSchema#string">My favourite actress in Natalie
Portman.</nif:isString>
<nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:beginIndex>
<nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">40</nif:endIndex>
<nif:sourceUrl rdf:resource="http://differentday.blogspot.com/2007_01_01_archive.html"/>
</rdf:Description>
<nif:String rdf:about="http://example.org/document/1#char=24,39">
<rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
<nif:anchorOf xml:lang="en">Natalie Portman</nif:anchorOf>
<nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:beginIndex>
<nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:endIndex>
<nif:taIdentRef rdf:resource="http://dbpedia.org/resource/Natalie_Portman"/>
<itsrdf:referenceContext rdf:resource="http://example.org/document/1#char=0,40"/>
</nif:String>
</rdf:RDF>
●
●
●
// Description of a person in JSON-LD
{
"@context": "http://json-ld.org/contexts/person.jsonld",
"@id": "http://dbpedia.org/resource/John_Lennon",
"name": "John Lennon",
"born": "1940-10-09",
"spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
}
// Description of a person in N3 notation
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://dbpedia.org/resource/John_Lennon> schema:birthDate "1940-10-09"^^xsd:dateTime ;
schema:spouse <http://dbpedia.org/resource/Cynthia_Lennon> ;
foaf:name "John Lennon" .
●
●
●
●
●
●
// Description of an event.
{
// Defining short names and links to concepts and properties in an ontology.
"@context": {
"ical": "http://www.w3.org/2002/12/cal/ical#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"ical:dtstart": {
"@type": "xsd:dateTime"
}
},
"@id": "http://example.org/resource/Lady_Gaga_Concert_in_New_Orleans",
"ical:summary": "Lady Gaga Concert",
"ical:location": "New Orleans Arena, New Orleans, Louisiana, USA",
"ical:dtstart": "2011-04-09T20:00Z"
}
// Description of an event.
{
"@context": {
"ical": "http://www.w3.org/2002/12/cal/ical#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"ical:dtstart": {
"@type": "xsd:dateTime"
}
},
"@id": "http://example.org/resource/Lady_Gaga_Concert_in_New_Orleans",
"ical:summary": "Lady Gaga Concert",
"ical:location": "New Orleans Arena, New Orleans, Louisiana, USA",
"ical:dtstart": "2011-04-09T20:00Z"
}
●
●
●
// Description of an event.
{
"@context": {
"ical": "http://www.w3.org/2002/12/cal/ical#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"ical:dtstart": {
"@type": "xsd:dateTime" // typed value
},
"Event": "http://schema.org/Event"
},
"@id": "http://example.org/resource/Lady_Gaga_Concert_in_New_Orleans",
"ical:summary": "Lady Gaga Concert",
"ical:location": "New Orleans Arena, New Orleans, Louisiana, USA",
"ical:dtstart": "2011-04-09T20:00Z",
// typing of the node as "Event"
"@type": "Event"
}
●
●
// The NIF documents is one JSON object.
{
// Prefixes definitions.
"@context": {
"dbpedia": "http://dbpedia.org/resource/",
"itsrdf": "http://www.w3.org/2005/11/its/rdf#",
"nif": "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
...
...
// The instances of concepts such as string annotations and context documents
// are stored in the "@graph" array.
"@graph": [
// Node representing the NIF context document.
{
"@id": "http://example.org/document/1#char=0,40",
"@type": [
"nif:String",
"nif:Context",
"nif:RFC5147String"
],
"nif:beginIndex": {
"@type": "xsd:nonNegativeInteger",
"@value": "0"
},
"nif:endIndex": {
"@type": "xsd:nonNegativeInteger",
"@value": "40"
},
"nif:isString": "My favourite actress in Natalie Portman.",
"nif:sourceUrl": {
"@id": "http://differentday.blogspot.com/2007_01_01_archive.html"
}
}
...
...
// Node representing the string annotation of "Natalie Portman"
{
"@id": "http://example.org/document/1#char=24,39",
"@type": [
"nif:RFC5147String",
"nif:String"
],
"itsrdf:taIdentRef": {
"@id": "dbpedia:Natalie_Portman"
},
"nif:anchorOf": {
"@language": "en",
"@value": "Natalie Portman"
},
"nif:beginIndex": {
"@value": "24"
},
"nif:endIndex": {
"@value": "39"
},
"nif:referenceContext": {
"@id": "http://example.org/document/1#char=0,40"
}
}
] } // End of the NIF document.
●
●
● …
●
●
●
●
●
●
●
●
●
prefix=http://example.org%23 and input "My favourite actress is Natalie Portman."
<http://example.org#char=0,40>
a nif:String, nif:Context, nif:RFC5147String ;
nif:isString "My favourite actress in Natalie Portman."^^xsd:string ;
nif:beginIndex "0"^^xsd:nonNegativeInteger ;
nif:endIndex "40"^^xsd:nonNegativeInteger .
●
●
●
● …
●
curl -v "http://spotlight.nlp2rdf.aksw.org/spotlight?f=text&i=This+is+Germany.&t=direct&confidence=0.3"
> GET /spotlight?f=text&i=This+is+Germany.&t=direct&confidence=0.3 HTTP/1.1
> Host: spotlight.nlp2rdf.aksw.org
> Accept: */*
< HTTP/1.1 200 OK
< Content-Type: text/turtle
<
< ... results in turtle ...
●
●
●
●
●
●
●
> POST /spotlight?f=text&t=direct&confidence=0.3 HTTP/1.1
> Host: spotlight.nlp2rdf.aksw.org
> Accept: */*
>
> This is Germany
< HTTP/1.1 200 OK
< Content-Type: text/turtle
< Location: http://spotlight.nlp2rdf.aksw.org/spotlight/document154
... after some time the client can check the results at the URI in the Location header.
> GET /http://spotlight.nlp2rdf.aksw.org/spotlight/document154 HTTP/1.1
> Host: spotlight.nlp2rdf.aksw.org
> Accept: */*
< HTTP/1.1 200 OK
< Content-Type: text/turtle
<
< ... results in turtle ...
●
●
●
●
●
●
● …
●
●
●
●
●
●
●
●
●
https://github.com/NLP2RDF/software
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
Photo
[to be included]
Photo
[to be included]

More Related Content

Similar to NIF Tutorial

SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
andyseaborne
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
Marakana Inc.
 
Yokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQLYokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQL
Fuyuko Matsumura
 
Hooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQLHooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQL
Samuel Lampa
 

Similar to NIF Tutorial (20)

SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
RejectKaigi2010 - RDF.rb
RejectKaigi2010 - RDF.rbRejectKaigi2010 - RDF.rb
RejectKaigi2010 - RDF.rb
 
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
Golang and Domain Specific Languages - Lorenzo Fontana - Codemotion Rome 2017
 
Sasaki datathon-madrid-2015
Sasaki datathon-madrid-2015Sasaki datathon-madrid-2015
Sasaki datathon-madrid-2015
 
Programming with LOD
Programming with LODProgramming with LOD
Programming with LOD
 
An Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of DataAn Introduction to RDF and the Web of Data
An Introduction to RDF and the Web of Data
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)
 
Optimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdfOptimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdf
 
Linked Open Data - Masaryk University in Brno 8.11.2016
Linked Open Data - Masaryk University in Brno 8.11.2016Linked Open Data - Masaryk University in Brno 8.11.2016
Linked Open Data - Masaryk University in Brno 8.11.2016
 
Querying Linked Data with SPARQL
Querying Linked Data with SPARQLQuerying Linked Data with SPARQL
Querying Linked Data with SPARQL
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Yokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQLYokohama Art Spot meets SPARQL
Yokohama Art Spot meets SPARQL
 
Hooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQLHooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQL
 
Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introduction
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQL
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

NIF Tutorial

  • 1.
  • 2.
  • 5.
  • 6.
  • 7.
  • 8. ● ● ● ● @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . <http://example.org/document/1#char=0,11> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "the content"^^xsd:string; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "11"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
  • 9. ● ● @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . <http://example.org/document/1#char=0,21> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "We talk about Xiamen."^^xsd:string; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "21"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . <http://example.org/document/1#char=14,20> a nif:String , nif:RFC5147String ; nif:referenceContext <http://example.org/document/1#char=0,3680> ; nif:anchorOf "Xiamen"^^xsd:string ; nif:beginIndex "14"^^xsd:nonNegativeInteger ; nif:endIndex "20"^^xsd:nonNegativeInteger ; nif:wasConvertedFrom <http://example.org?t=url&f=html&i=http://somewebpage. com#char=0,2820> ; a nif:Word, nif:Phrase ; itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> . itsrdf:taClassRef <http://dbpedia.org/ontology/City> ; itsrdf:taClassRef <http://dbpedia.org/ontology/Settlement> ; itsrdf:taClassRef <http://dbpedia.org/ontology/PopulatedPlace> ; itsrdf:taClassRef <http://dbpedia.org/ontology/Place> ;
  • 10. ● ● @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . <http://example.org/document/1#char=0,21> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "We talk about Xiamen."^^xsd:string; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "21"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . <http://example.org/document/1#char=14,20> a nif:String , nif:RFC5147String ; nif:referenceContext <http://example.org/document/1#char=0,3680> ; nif:anchorOf "Xiamen"^^xsd:string ; nif:beginIndex "14"^^xsd:nonNegativeInteger ; nif:endIndex "20"^^xsd:nonNegativeInteger ; nif:wasConvertedFrom <http://example.org?t=url&f=html&i=http://somewebpage. com#char=0,2820> ; a nif:Word, nif:Phrase ; itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> . itsrdf:taClassRef <http://dbpedia.org/ontology/City> ; itsrdf:taClassRef <http://dbpedia.org/ontology/Settlement> ; itsrdf:taClassRef <http://dbpedia.org/ontology/PopulatedPlace> ; itsrdf:taClassRef <http://dbpedia.org/ontology/Place> ;
  • 11. ● ● @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . <http://example.org/document/1#char=0,21> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "We talk about Xiamen."^^xsd:string; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "21"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . <http://example.org/document/1#char=14,20> a nif:String , nif:RFC5147String , nif:Word, nif:Phrase ; nif:referenceContext <http://example.org/document/1#char=0,3680> ; nif:anchorOf "Xiamen"^^xsd:string ; nif:beginIndex "14"^^xsd:nonNegativeInteger ; nif:endIndex "20"^^xsd:nonNegativeInteger ; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . nif:wasConvertedFrom <http://example.com/?informat=html&intype=url&input=http: //differentday.blogspot.com/2007_01_01_archive.html/&xpath=/html/body[1]/h2[1] /span[1]/text()[1]>.
  • 12. ● ● ● @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . <http://example.org/document/1#char=0,21> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "We talk about Xiamen."^^xsd:string; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "21"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . <http://example.org/document/1#char=14,20> a nif:String , nif:RFC5147String , nif:Word, nif:Phrase ; nif:referenceContext <http://example.org/document/1#char=0,3680> ; nif:anchorOf "Xiamen"^^xsd:string ; nif:beginIndex "14"^^xsd:nonNegativeInteger ; nif:endIndex "20"^^xsd:nonNegativeInteger ; itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> . itsrdf:taClassRef <http://dbpedia.org/ontology/City> ; itsrdf:taClassRef <http://dbpedia.org/ontology/PopulatedPlace> ; itsrdf:taClassRef <http://dbpedia.org/ontology/Place> ;
  • 13.
  • 14. ● ● @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . // NIF document for processing - named entity extraction. <http://example.org/document/1#char=0,21> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "We talk about Xiamen."^^xsd:string; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "21"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . // Detected entity mention linked with its DBpedia representation and ontology class. <http://example.org/document/1#char=14,20> a nif:String , nif:RFC5147String , nif:Word, nif:Phrase ; nif:referenceContext <http://example.org/document/1#char=0,3680> ; nif:anchorOf "Xiamen"""^^xsd:string ; nif:beginIndex "14"^^xsd:nonNegativeInteger ; nif:endIndex "20"^^xsd:nonNegativeInteger ; itsrdf:taIdentRef <http://dbpedia.org/resource/Xiamen> . itsrdf:taClassRef <http://dbpedia.org/ontology/City> ;
  • 15.
  • 16. ● ● ● @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . // Input NIF document for translation. <http://example.org/document/1#char=0,17> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "text to translate"@en; itsrdf:translate "yes" ; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "17"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . // Translated document in NIF. <http://example.org/document/1#char=0,17> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "text to translate"@en; itsrdf:target "translated text"@fr ; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "17"^^xsd:nonNegativeInteger; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> .
  • 17. ● ● @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . // Input NIF document for translation. <http://example.org/document/1#char=0,17> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "text to translate"@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "3680"^^xsd:nonNegativeInteger. // String within the document intended for translation. <http://example.org/document/1#char=0,4> a nif:String , nif:RFC5147String ; nif:anchorOf "text"@en; itsrdf:translate "yes" ; nif:referenceContext <http://example.org/document/1#char=0,17>. // String within the document not intended for translation. <http://example.org/document/1#char=8,17> a nif:String , nif:RFC5147String ; nif:anchorOf "translate"@en; itsrdf:translate "no" ; nif:referenceContext <http://example.org/document/1#char=0,17>.
  • 18. ● @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . @prefix vt: <http://www.w3.org/2005/11/its/rdf#> . // Input NIF document for translation. <http://example.org/document/en#char=0,55> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "My destination is only a 'hop-and-a-skip' from my home."@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "55"^^xsd:nonNegativeInteger; itsrdf:translate "yes" . // NIF document containing the translated content. <http://example.org/document/de#char=0,57> a nif:String , nif:Context , nif:RFC5147String ; nif:anchorOf "Mein Ziel ist nur ein 'Katzen-sprung' von meinem Zuhause."@de; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "57"^^xsd:nonNegativeInteger; // Link between the translated document and the source. <http://example.org/document/en#char=0,55> vt:translatedAs <http://example.org/document/de#char=0,57>.
  • 19.
  • 20. ● ● @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . // Input NIF document to be processed. <http://example.org/document/1#char=0,131> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "A computer is a general purpose device that can be programmed to carry out a set of arithmetic or logical operations automatically."@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "131"^^xsd:nonNegativeInteger. // Annotated terminology in NIF. <http://example.org/document/1#char=2,10> a nif:String , nif:RFC5147String ; nif:anchorOf "computer"@en; itsrdf:termInfoRef <#1431254> ; itsrdf:term "yes" ; nif:referenceContext <http://example.org/document/1#char=0,131>.
  • 21.
  • 22. ● ● @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . // The NIF document. <http://example.org/document/1#char=0,59> a nif:String , nif:Context , nif:RFC5147String ; nif:isString "Gringoire, a practical philosopher of the streets of Paris."@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "59"^^xsd:nonNegativeInteger. // Annotated entity mention with link to DBpedia resource. <http://example.org/document/1#char=0,9> a nif:String , nif:RFC5147String ; nif:anchorOf "Gringoire"@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "9"^^xsd:nonNegativeInteger. itsrdf:taIdentRef <http://dbpedia.org/resource/Pierre_Gringoire> ; nif:referenceContext <http://example.org/document/1#char=0,59>. // Visualised NIF: HTML + microdata. <p><span about="http://dbpedia.org/resource/Pierre_Gringoire" property="schema:name" >Gringoire</span>, a practical philosopher of the streets of Paris.</p>
  • 23.
  • 24. ● ● ● // Annotated entity mention with link to a DBpedia resource. <http://example.org/document/1#char=0,6> a nif:String , nif:RFC5147String ; nif:anchorOf "Berlin"@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "6"^^xsd:nonNegativeInteger; itsrdf:taIdentRef <http://dbpedia.org/resource/Berlin> . @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . // Entity enriched with geo-coordinates. <http://example.org/document/1#char=0,6> a nif:String , nif:RFC5147String ; nif:anchorOf "Berlin"@en; nif:beginIndex "0"^^xsd:nonNegativeInteger; nif:endIndex "6"^^xsd:nonNegativeInteger; itsrdf:taIdentRef <http://dbpedia.org/resource/Berlin>; geo:lat "52.516666"; geo:long "13.383333" .
  • 25. ● ● > POST /e-link/?f=turtle&t=direct HTTP/1.1 > Host: sandbox.freme-project.eu > Accept: application/rdf+xml > > ... data for conversion ... < HTTP/1.1 200 OK < Content-Type: application/rdf+xml < < ... results converted in rdf/xml ...
  • 26.
  • 27. @prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> . // The NIF context document. <http://example.org/document/1#char=0,40> a nif:String, nif:Context, nif:RFC5147String ; nif:isString "My favourite actress in Natalie Portman."^^xsd:string ; nif:beginIndex "0"^^xsd:nonNegativeInteger ; nif:endIndex "40"^^xsd:nonNegativeInteger ; nif:sourceUrl <http://differentday.blogspot.com/2007_01_01_archive.html> . // Annotated entity mention with link to a DBpedia resource. <http://example.org/document/1#char=24,39> a nif:String, nif:RFC5147String ; nif:anchorOf "Natalie Portman"@en; nif:beginIndex "24"^^xsd:nonNegativeInteger; nif:endIndex "39"^^xsd:nonNegativeInteger; itsrdf:taIdentRef <http://dbpedia.org/resource/Natalie_Portman> ; nif:referenceContext <http://example.org/document/1#char=0,40> . ● ● ●
  • 28. <http://example.org/document/1#char=0,40> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String> . <http://example.org/document/1#char=0,40> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context> . <http://example.org/document/1#char=0,40> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String> . <http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#isString> "My favourite actress in Natalie Portman." . <http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#beginIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> . <http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#endIndex> "40"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> . <http://example.org/document/1#char=0,40> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#sourceUrl> <http://differentday.blogspot.com/2007_01_01_archive.html> . <http://example.org/document/1#char=24,39> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String> . <http://example.org/document/1#char=24,39> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String> . <http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#anchorOf> "Natalie Portman"@en . <http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#beginIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> . <http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#endIndex> "0"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger> . <http://example.org/document/1#char=24,39> <http://www.w3.org/2005/11/its/rdf#taIdentRef> <http://dbpedia.org/resource/Natalie_Portman> . <http://example.org/document/1#char=24,39> <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#referenceContext> <http://example.org/document/1#char=0,40> . ● ● ● ● ● ●
  • 29. <?xml version="1.0" encoding="utf-8" ?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:nif="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#" xmlns:itsrdf="http://www.w3.org/2005/11/its/rdf#"> <rdf:Description rdf:about="http://example.org/document/1#char=0,40"> <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/> <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context"/> <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/> <nif:isString rdf:datatype="http://www.w3.org/2001/XMLSchema#string">My favourite actress in Natalie Portman.</nif:isString> <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:beginIndex> <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">40</nif:endIndex> <nif:sourceUrl rdf:resource="http://differentday.blogspot.com/2007_01_01_archive.html"/> </rdf:Description> <nif:String rdf:about="http://example.org/document/1#char=24,39"> <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/> <nif:anchorOf xml:lang="en">Natalie Portman</nif:anchorOf> <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:beginIndex> <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:endIndex> <nif:taIdentRef rdf:resource="http://dbpedia.org/resource/Natalie_Portman"/> <itsrdf:referenceContext rdf:resource="http://example.org/document/1#char=0,40"/> </nif:String> </rdf:RDF> ● ● ●
  • 30. // Description of a person in JSON-LD { "@context": "http://json-ld.org/contexts/person.jsonld", "@id": "http://dbpedia.org/resource/John_Lennon", "name": "John Lennon", "born": "1940-10-09", "spouse": "http://dbpedia.org/resource/Cynthia_Lennon" } // Description of a person in N3 notation @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix schema: <http://schema.org/> . @prefix xml: <http://www.w3.org/XML/1998/namespace> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://dbpedia.org/resource/John_Lennon> schema:birthDate "1940-10-09"^^xsd:dateTime ; schema:spouse <http://dbpedia.org/resource/Cynthia_Lennon> ; foaf:name "John Lennon" . ● ● ●
  • 31. ● ● ● // Description of an event. { // Defining short names and links to concepts and properties in an ontology. "@context": { "ical": "http://www.w3.org/2002/12/cal/ical#", "xsd": "http://www.w3.org/2001/XMLSchema#", "ical:dtstart": { "@type": "xsd:dateTime" } }, "@id": "http://example.org/resource/Lady_Gaga_Concert_in_New_Orleans", "ical:summary": "Lady Gaga Concert", "ical:location": "New Orleans Arena, New Orleans, Louisiana, USA", "ical:dtstart": "2011-04-09T20:00Z" }
  • 32. // Description of an event. { "@context": { "ical": "http://www.w3.org/2002/12/cal/ical#", "xsd": "http://www.w3.org/2001/XMLSchema#", "ical:dtstart": { "@type": "xsd:dateTime" } }, "@id": "http://example.org/resource/Lady_Gaga_Concert_in_New_Orleans", "ical:summary": "Lady Gaga Concert", "ical:location": "New Orleans Arena, New Orleans, Louisiana, USA", "ical:dtstart": "2011-04-09T20:00Z" } ● ● ●
  • 33. // Description of an event. { "@context": { "ical": "http://www.w3.org/2002/12/cal/ical#", "xsd": "http://www.w3.org/2001/XMLSchema#", "ical:dtstart": { "@type": "xsd:dateTime" // typed value }, "Event": "http://schema.org/Event" }, "@id": "http://example.org/resource/Lady_Gaga_Concert_in_New_Orleans", "ical:summary": "Lady Gaga Concert", "ical:location": "New Orleans Arena, New Orleans, Louisiana, USA", "ical:dtstart": "2011-04-09T20:00Z", // typing of the node as "Event" "@type": "Event" } ● ●
  • 34. // The NIF documents is one JSON object. { // Prefixes definitions. "@context": { "dbpedia": "http://dbpedia.org/resource/", "itsrdf": "http://www.w3.org/2005/11/its/rdf#", "nif": "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "xsd": "http://www.w3.org/2001/XMLSchema#" }, ...
  • 35. ... // The instances of concepts such as string annotations and context documents // are stored in the "@graph" array. "@graph": [ // Node representing the NIF context document. { "@id": "http://example.org/document/1#char=0,40", "@type": [ "nif:String", "nif:Context", "nif:RFC5147String" ], "nif:beginIndex": { "@type": "xsd:nonNegativeInteger", "@value": "0" }, "nif:endIndex": { "@type": "xsd:nonNegativeInteger", "@value": "40" }, "nif:isString": "My favourite actress in Natalie Portman.", "nif:sourceUrl": { "@id": "http://differentday.blogspot.com/2007_01_01_archive.html" } } ...
  • 36. ... // Node representing the string annotation of "Natalie Portman" { "@id": "http://example.org/document/1#char=24,39", "@type": [ "nif:RFC5147String", "nif:String" ], "itsrdf:taIdentRef": { "@id": "dbpedia:Natalie_Portman" }, "nif:anchorOf": { "@language": "en", "@value": "Natalie Portman" }, "nif:beginIndex": { "@value": "24" }, "nif:endIndex": { "@value": "39" }, "nif:referenceContext": { "@id": "http://example.org/document/1#char=0,40" } } ] } // End of the NIF document.
  • 37.
  • 39. ● ● prefix=http://example.org%23 and input "My favourite actress is Natalie Portman." <http://example.org#char=0,40> a nif:String, nif:Context, nif:RFC5147String ; nif:isString "My favourite actress in Natalie Portman."^^xsd:string ; nif:beginIndex "0"^^xsd:nonNegativeInteger ; nif:endIndex "40"^^xsd:nonNegativeInteger . ● ● ● ● …
  • 40. ● curl -v "http://spotlight.nlp2rdf.aksw.org/spotlight?f=text&i=This+is+Germany.&t=direct&confidence=0.3" > GET /spotlight?f=text&i=This+is+Germany.&t=direct&confidence=0.3 HTTP/1.1 > Host: spotlight.nlp2rdf.aksw.org > Accept: */* < HTTP/1.1 200 OK < Content-Type: text/turtle < < ... results in turtle ... ● ● ● ● ● ●
  • 41. ● > POST /spotlight?f=text&t=direct&confidence=0.3 HTTP/1.1 > Host: spotlight.nlp2rdf.aksw.org > Accept: */* > > This is Germany < HTTP/1.1 200 OK < Content-Type: text/turtle < Location: http://spotlight.nlp2rdf.aksw.org/spotlight/document154 ... after some time the client can check the results at the URI in the Location header. > GET /http://spotlight.nlp2rdf.aksw.org/spotlight/document154 HTTP/1.1 > Host: spotlight.nlp2rdf.aksw.org > Accept: */* < HTTP/1.1 200 OK < Content-Type: text/turtle < < ... results in turtle ... ● ●
  • 42.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 53.