dbpedia / ontology-tracker

Here we keep track of modification requests in the DBpedia Ontology
35 stars 11 forks source link

Missing datatype definitions #8

Closed LorenzBuehmann closed 9 years ago

LorenzBuehmann commented 9 years ago

Parsing the ontology with any OWL compliant parser like contained in OWL API is ambiguous because there are some data properties whose range is a user defined datatype which is not explicitly defined as a datatype. A parser might treat those datatypes as classes which in fact makes those properties to be handled as data proeprties. Depending on the parser this can lead to properties that are handled as both object and data properties which is not OWL 2 DL compliant but OWL 2 Full.

The properties can be found with

select ?p {
?p a owl:DatatypeProperty;
rdfs:range ?range.
filter(strstarts(str(?range),'http://dbpedia.org/datatype/'))
}

The solution is to add additonal triples which can be generated by the query

construct {
?range a rdfs:Datatype .
} where {
?p a owl:DatatypeProperty;
rdfs:range ?range.
filter(strstarts(str(?range),'http://dbpedia.org/datatype/'))
}
jimkont commented 9 years ago

I adjusted the export and now the owl file would contain triples like the following. would this be sufficient? if you agree with the format this will be available on the mapping server exports and from the next release

<rdfs:Datatype rdf:about="http://dbpedia.org/datatype/milliampere">
            <rdfs:label xml:lang="en">milliampere</rdfs:label>

        </rdfs:Datatype><rdfs:Datatype rdf:about="http://dbpedia.org/datatype/megawattHour">
            <rdfs:label xml:lang="en">megawattHour</rdfs:label>

        </rdfs:Datatype><rdfs:Datatype rdf:about="http://dbpedia.org/datatype/azerbaijaniManat">
            <rdfs:label xml:lang="en">azerbaijaniManat</rdfs:label>

        </rdfs:Datatype><rdfs:Datatype rdf:about="http://dbpedia.org/datatype/latvianLats">
            <rdfs:label xml:lang="en">latvianLats</rdfs:label>

        </rdfs:Datatype><rdfs:Datatype rdf:about="http://dbpedia.org/datatype/rod">
            <rdfs:label xml:lang="en">rod</rdfs:label>
LorenzBuehmann commented 9 years ago

This would solve some problems, yes.

jimkont commented 9 years ago

Can you check if this export is fine? http://mappings.dbpedia.org/server/ontology/dbpedia.owl

LorenzBuehmann commented 9 years ago

The export looks correct, thank you.