How to say "Pat knows Mike's phone number" in RDF / OWL

How can I claim that Pat knows Mike's phone number as a concept, and not a specific phone number 1112223333 in RDF / OWL?

Reward points to be able to claim that Mary knows that Pat knows Mike's phone number ....

+4
source share
3 answers

With the appropriate know property, you can use rdf reification:

:Pat :knows [ rdf:subject :Mike ; rdf:predicate :telephoneNumber ; rdf:object <tel:1112223333> ] 

Few love reification, but for such things, everything is in order. For the second case, use double reification:

 :Mary :knows [ rdf:subject :Pat ; rdf:predicate :knows ; rdf:object [ rdf:subject _:b1 ; rdf:predicate rdf:subject ; rdf:object :Mike ; rdf:subject _:b2 ; rdf:predicate rdf:predicate ; ... sanity barrier exceeded ... ] ] 

If you are happy to go beyond a single schedule, life is easier. You can only have a few files:

FILE1:

 :Mary :knowsContentsOf <FILE2> 

FILE2:

 :Mike :telephoneNumber <tel:1112223333> 

Or even insert both into one envelope of a file and point to fragments of the file. This is essentially what the named charts give you in SPARQL.

+4
source

What about the following (using valid OWL DL for entertainment):

 # assume prefixes defined <> a owl:Ontology . :Person a owl:Class . :PhoneNumber a owl:Class . :knowsThing a owl:ObjectProperty; rdfs:domain :Person . :belongsTo a owl:ObjectProperty; rdfs:range :Person . :Mike a :Person . :Pat a :Person; :knowsThing [ a :PhoneNumber; :belongsTo :Mike ] . 

Your other expression about Mary is more complicated, because we are not just talking about knowing β€œthings,” we are talking about knowing about knowledge, which is very inconvenient to do in OWL and RDF. But let's turn to the task of doing this in OWL DL with the following ontology:

 <> a owl:Ontology . :Person a owl:Class . :PhoneNumber a owl:Class . :knowsThing a owl:ObjectProperty; rdfs:domain :Person . :knownBy a owl:AnnotationProperty; rdfs:range :Person . :belongsTo a owl:ObjectProperty; rdfs:range :Person . :Mike a :Person . :Pat a :Person; :knowsThing _:mikesnumber . _:mikesnumber a :PhoneNumber; :belongsTo :Mike . :Mary a :Person . [] a owl:Annotation; owl:annotatedSource :Pat; owl:annotatedProperty :knowsThing; owl:annotatedTarget _:mikenumber; :knownBy :Mary . 

The problem is that it does not make you much sense. user205512 and cygri answers are plausible alternatives, but they don't get you in terms of reasoning.

For more reasonable features, you can use some crazy things (only works with OWL 2 DL or OWL Full):

 :subject a owl:ObjectProperty; rdfs:domain :Statement . :predicate a owl:ObjectProperty; rdfs:domain :Statement . :object a owl:ObjectProperty; rdfs:domain :ObjectStatement . :dataObject a owl:DatatypeProperty; rdfs:domain :DataStatement . :hasPhone a owl:DatatypeProperty . :knowsFact a owl:ObjectProperty; rdfs:domain :Person; rdfs:range :Statement . :ObjectStatement a owl:Class; rdfs:subClassOf [ owl:onProperty :object; owl:cardinality 1 ] . :DataStatement a owl:Class; rdfs:subClassOf [ owl:onProperty :dataObject; owl:cardinality 1 ] . :Statement a owl:Class; owl:unionOf ( :ObjectStatement :DataStatement ); rdfs:subClassOf [ owl:onProperty :subject; owl:cardinality 1 ], [ owl:onProperty :predicate; owl:cardinality 1 ] . :Person a owl:Class . :Pat :knowsFact [ :subject :Mike; :predicate :hasPhone ] . :Mary :knowsFact [ :subject :Pat; :predicate :knowsFact; :object [ :subject :Mike; :predicate :hasPhone ] . 
+3
source

I would solve this using the named graphs. Insert the triple Mike phone number 1112223333 into one of the named graphs, and then add another triple to the default graph, which says: "Pat knows that named graph."

OWL does not support named graphs, but SPARQL 1.0 and RDF 1.1, although there is no standard syntax yet, so you need to bother loading individual graphs into the SPARQL repository from separate files.

+2
source

Source: https://habr.com/ru/post/1442652/


All Articles