DBpedia Spotlight

From NLP2RDF-Wiki
Jump to: navigation, search
This is a draft for discussion


Contents

Namespaces

For itsrdf see ITS2NIF2ITS

#  might change
 //nlp2rdf.lod2.eu/schema/frag/fragment.ttl#> .
# this does not exist yet:
 ua: //nlp2rdf.lod2.eu/schema/unity/unifiedannotation.ttl#> .
# this is currently being created:
 itsrdf: //www.w3.org/2005/11/its/rdf#> .
# default
 rdf: //www.w3.org/1999/02/22-rdf-syntax-ns#> .
 rdfs: //www.w3.org/2000/01/rdf-schema#> .
 owl: //www.w3.org/2002/07/owl#> .
 xsd: //www.w3.org/2001/XMLSchema#> .
 fise: //fise.iks-project.eu/ontology/> .

Example Input

Plain Text (243 characters)

NIF (text in RDF only)

The NIF wrapper parses the RDF and looks for the anchorOf property of all "Context" nodes.

//example.com/example.txt#char=0,> 
        "0"      ;
         "243"    ;
      """President Obama on Monday will call for a new minimum tax rate for individuals making more than $1 million a year to 
ensure that they pay at least the same percentage of their earnings as other taxpayers, according to administration officials."""  ;
      //example.com/example.txt> .
    rdf:type     ;
    rdf:type     .


NIF (text + disambiguation candidates)

The NIF wrapper parses the text and looks for the anchorOf property of all "Context" nodes. Additionally, it looks for all DisambiguationCandidates within the contexts.

//example.com/example.txt#char=0,> 
        "0"      ;
         "243"    ;
      """President Obama on Monday will call for a new minimum tax rate for individuals making more than $1 million a year to 
ensure that they pay at least the same percentage of their earnings as other taxpayers, according to administration officials."""  ;
      //example.com/example.txt> .
    rdf:type     ;
    rdf:type     .  
//example.com/example.txt#char=0,15> 
        "0"      ;
         "15"    ;
                """President Obama""" ;
        //example.com/example.txt#char=0,> ;
    rdf:type     , ua:DisambiguationCandidate .

itsrdf:disambigIdentRef

This is a very central property. It is functional, which means that a reasoner will conclude that if it occurs twice with different objects o1 and o2, then o1 owl:sameAs o2 .

Examples

//example.com/example.txt#char=0,15>  
    itsrdf:disambigIdentRef  //dbpedia.org/resource/Barack_Obama> ;
    itsrdf:disambigIdentRef  //rdf.freebase.com/ns/m.02mjmr> . 
## entails that
 //dbpedia.org/resource/Barack_Obama>  owl:sameAs  //rdf.freebase.com/ns/m.02mjmr> .

Example output

Direct representation of the annotations

//example.com/example.txt#char=0,> 
        "0"      ;
         "243"    ;
      """President Obama on Monday will call for a new minimum tax rate for individuals making more than $1 million a year to 
ensure that they pay at least the same percentage of their earnings as other taxpayers, according to administration officials."""  ;
      //example.com/example.txt> .
    rdf:type     ;
    rdf:type     .  
//example.com/example.txt#char=0,15> 
        "0"      ;
         "15"    ;
                """President Obama""" ;
        //example.com/example.txt#char=0,> ;
    rdf:type     ;
####### newly added ##########
    itsrdf:disambigIdentRef  //dbpedia.org/resource/Barack_Obama> .
# this triple adds the NERD mapping
//dbpedia.org/resource/Barack_Obama>
    rdf:type /nerd.eurecom.fr/ontology#Person> .
##############################
# the following annotations depend on the existence of itsrdf:disambigIdentRef
# and they are functional
##############################
//example.com/example.txt#char=0,15> 
    ua:created "2012-07-25T09:02:38.694Z"^^xsd:dateTime ;
    ua:creator "http://spotlight.dbpedia.org" ;
    ua:confidence 0.9464704504529554 ; 
    itsrdf:entityTypeSourceRef //nerd.eurecom.fr/ontology#> ;
    itsrdf:entityTypeIdentRef  /nerd.eurecom.fr/ontology#Person> ;
    itsrdf:disambigSourceRef   //dbpedia.org> ; 
    itsrdf:disambigType        "entity" .

Alternatives of the annotation using Stanbol

Note that this is in addition to the above output. The transformation is simple: Just select the annotation with the highest confidence.
## these are additional, complementary triples
//example.com/example.txt#char=0,15> 
## ua:annotation is a general purpose property. 
    ua:annotation   .

    fise:confidence 0.9464704504529554 ;
    fise:entity-label "Barack Obama"@en ;
    fise:entity-reference //dbpedia.org/resource/Barack_Obama> ;
## NIF 2.0 is likely to require this mandatory NERD mapping:     
    fise:entity-type /nerd.eurecom.fr/ontology#Person> ;
## optional inclusion, as these can be loaded from DBpedia via http
    fise:entity-type dbo:Person, owl:Thing, foaf:Person, dbo:Person, dbo:OfficeHolder, dbo:Agent, //schema.org/Person> ;
    dcterms:created "2012-07-25T09:02:38.703Z"^^xsd:dateTime ;
    dcterms:creator "org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine"^^xsd:string ;
    dcterms:relation  ;
    stahub:site "dbpedia" ;
    rdf:type fise:Enhancement ;
    rdf:type fise:EntityAnnotation .
Retrieved from "http://wiki.nlp2rdf.org/index.php?title=DBpedia_Spotlight&oldid=681"
Personal tools
Namespaces

Variants
Views
  • Read
  • View source
  • View history
Actions
Back to main:
NIF 2.0 Draft
Documentation
ToDo - Help Wanted
Navigation
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version