我有一个简单的本体论如下
<?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
富人。
现在在我们的实例中,约翰观看YouTube,YouTube是一个互联网频道,因此只有高级电视才能使用互联网频道,高级电视只有富人才拥有,因此约翰应该富有。但如前所述,我一直认为约翰是一个人