NLP2RDF / NIF-lib

A small java library for NLP Interchange Format (NIF) for NER(D) systems
10 stars 5 forks source link

Addition for Json LD output #8

Closed kurzum closed 8 years ago

kurzum commented 8 years ago
  1. add context "referenceContext": "http://freme-project.eu#offset_0_33",
  2. add http://freme-project.eu/#collection a nif:ContextCollection ; nif:hasContext http://freme-project.eu/#offset_0_33 ; http://purl.org/dc/terms/conformsTo http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/2.1 .
  3. add md5 hast to uris
sandroacoelho commented 8 years ago

As you have requested, Our current JSON-LD output looks like:

{
    "@context": "http://www.freme-project.eu/context.jsonld",
     "referenceContext": {
          "@type": ["ContextCollection"] ,
          "hasContext":"http://freme-project.eu/#offset_0_33",
          "http://purl.org/dc/terms/conformsTo" : "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/org.unileipzig.persistence.nif-core/2.1"
    },
    "graph": [
                        {
            "@id":  "b4a3fc77148b17cd21face1c1169353f",
            "@type": { "String", "Word", "Phrase", "OffsetBasedString"],
            "annotationUnit" : [
                                "taAnnotatorsRef" : "http://freme-project.eu/tools/freme-ner",
                                "taClassRef": ["[http://dbpedia.org/ontology/Place, http://dbpedia.org/ontology/Location, http://dbpedia.org/ontology/PopulatedPlace, http://nerd.eurecom.fr/ontology#Location, http://dbpedia.org/ontology/Country]"],
                                "taConfidence": ["0.9804963628413852"],
                                "taIdentRef": "http://dbpedia.org/resource/Argentina",
                               ],
            "nif:isString" : "Argentina",
            "beginIndex": "23",
            "endIndex": "32"
            },
                                {
            "@id":  "ca6e4dcf014c81a0ced8b01d849a29c9",
            "@type": { "String", "Word", "Phrase", "OffsetBasedString"],
            "annotationUnit" : [
                                "taAnnotatorsRef" : "http://freme-project.eu/tools/freme-ner",
                                "taClassRef": ["[http://dbpedia.org/ontology/Person, http://dbpedia.org/ontology/SportsManager, http://dbpedia.org/ontology/SoccerManager, http://nerd.eurecom.fr/ontology#Person]"],
                                "taConfidence": ["0.9869992701528016"],
                                "taIdentRef": "http://dbpedia.org/resource/Diego_Maradona",
                               ],
            "nif:isString" : "Diego Maradona",
            "beginIndex": "0",
            "endIndex": "14"
            }          
    ]
}
sandroacoelho commented 8 years ago

@kurzum

:b0 http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#referenceContext :b1 . _:b1 http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#hasContext "http://freme-project.eu#offset_0_33" . _:b1 http://purl.org/dc/terms/conformsTo "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/org.unileipzig.persistence.nif-core/2.1" .