我有一个简单的本体如下
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
<!ENTITY assignment "http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#" >
]>
<rdf:RDF xmlns="http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#"
xml:base="http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:assignment="http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about="http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment"/>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Object Properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#channel_of -->
<owl:ObjectProperty rdf:about="&assignment;channel_of">
<rdfs:domain rdf:resource="&assignment;Channels"/>
<rdfs:range rdf:resource="&assignment;Television"/>
<owl:inverseOf rdf:resource="&assignment;has_channels"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#has_channels -->
<owl:ObjectProperty rdf:about="&assignment;has_channels">
<rdfs:range rdf:resource="&assignment;Channels"/>
<rdfs:domain rdf:resource="&assignment;Television"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#has_inet_connection -->
<owl:ObjectProperty rdf:about="&assignment;has_inet_connection">
<rdfs:range rdf:resource="&assignment;InternetConnection"/>
<rdfs:domain rdf:resource="&assignment;Person"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#has_television -->
<owl:ObjectProperty rdf:about="&assignment;has_television">
<rdfs:domain rdf:resource="&assignment;Person"/>
<rdfs:range rdf:resource="&assignment;Television"/>
<owl:inverseOf rdf:resource="&assignment;ownes_by"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#internet_connection_owned_by -->
<owl:ObjectProperty rdf:about="&assignment;internet_connection_owned_by">
<rdfs:domain rdf:resource="&assignment;InternetConnection"/>
<rdfs:range rdf:resource="&assignment;Person"/>
<owl:inverseOf rdf:resource="&assignment;has_inet_connection"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#ownes_by -->
<owl:ObjectProperty rdf:about="&assignment;ownes_by">
<rdfs:range rdf:resource="&assignment;Person"/>
<rdfs:domain rdf:resource="&assignment;Television"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#watched_by -->
<owl:ObjectProperty rdf:about="&assignment;watched_by">
<rdfs:domain rdf:resource="&assignment;Channels"/>
<rdfs:range rdf:resource="&assignment;Person"/>
<owl:inverseOf rdf:resource="&assignment;watches"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#watches -->
<owl:ObjectProperty rdf:about="&assignment;watches">
<rdfs:range rdf:resource="&assignment;Channels"/>
<rdfs:domain rdf:resource="&assignment;Person"/>
</owl:ObjectProperty>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Data properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#yh -->
<owl:DatatypeProperty rdf:about="&assignment;yh"/>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Advanced -->
<owl:Class rdf:about="&assignment;Advanced">
<rdfs:subClassOf rdf:resource="&assignment;Coloured"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&assignment;ownes_by"/>
<owl:allValuesFrom rdf:resource="&assignment;Rich"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Antena -->
<owl:Class rdf:about="&assignment;Antena">
<rdfs:subClassOf rdf:resource="&assignment;Channels"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#BlackAndWhite -->
<owl:Class rdf:about="&assignment;BlackAndWhite">
<rdfs:subClassOf rdf:resource="&assignment;Television"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#CRT -->
<owl:Class rdf:about="&assignment;CRT">
<rdfs:subClassOf rdf:resource="&assignment;Coloured"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&assignment;ownes_by"/>
<owl:allValuesFrom rdf:resource="&assignment;Mid"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Channels -->
<owl:Class rdf:about="&assignment;Channels"/>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Coloured -->
<owl:Class rdf:about="&assignment;Coloured">
<rdfs:subClassOf rdf:resource="&assignment;Television"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#High -->
<owl:Class rdf:about="&assignment;High">
<rdfs:subClassOf rdf:resource="&assignment;InternetConnection"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Internet -->
<owl:Class rdf:about="&assignment;Internet">
<rdfs:subClassOf rdf:resource="&assignment;Channels"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&assignment;channel_of"/>
<owl:allValuesFrom rdf:resource="&assignment;Advanced"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#InternetConnection -->
<owl:Class rdf:about="&assignment;InternetConnection"/>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#LCD -->
<owl:Class rdf:about="&assignment;LCD">
<rdfs:subClassOf rdf:resource="&assignment;Coloured"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&assignment;ownes_by"/>
<owl:someValuesFrom rdf:resource="&assignment;Rich"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#LED -->
<owl:Class rdf:about="&assignment;LED">
<rdfs:subClassOf rdf:resource="&assignment;Coloured"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&assignment;ownes_by"/>
<owl:someValuesFrom rdf:resource="&assignment;Rich"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Medium -->
<owl:Class rdf:about="&assignment;Medium">
<rdfs:subClassOf rdf:resource="&assignment;InternetConnection"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Mid -->
<owl:Class rdf:about="&assignment;Mid">
<rdfs:subClassOf rdf:resource="&assignment;Person"/>
<owl:disjointWith rdf:resource="&assignment;Rich"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Person -->
<owl:Class rdf:about="&assignment;Person"/>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Rich -->
<owl:Class rdf:about="&assignment;Rich">
<rdfs:subClassOf rdf:resource="&assignment;Person"/>
</owl:Class>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Television -->
<owl:Class rdf:about="&assignment;Television"/>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Individuals
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#John -->
<owl:NamedIndividual rdf:about="&assignment;John"/>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#SLTA -->
<owl:NamedIndividual rdf:about="&assignment;SLTA">
<rdf:type rdf:resource="&assignment;Advanced"/>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/shadowman/ontologies/2013/5/assignment#Youtube -->
<owl:NamedIndividual rdf:about="&assignment;Youtube">
<rdf:type rdf:resource="&assignment;Internet"/>
<watched_by rdf:resource="&assignment;John"/>
</owl:NamedIndividual>
</rdf:RDF>
<!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net -->
现在,我要推断那个人John
是富人。我尝试了各种限制,但只有我得到'约翰是一个人'。
我最初的本体想法是这样的,如果一个人从他的电视上看一个互联网频道,那么他就有了一台高级电视,高级电视只是owned_by
有钱人。
现在在我们的实例中,John 看 YouTube,YouTube 是一个互联网频道,所以互联网频道只在高级电视中可用,而高级电视只有富人拥有,因此约翰应该是有钱人。但如前所述,我一直认为约翰是一个人