0

I'm new to this ontology. I m using protege now. I have 2 classes BT and Document. I have created 2 Object Property 1. topic (Domain:Document , Range:BT) 2. hasDocument (Inverse property of topic).

I have created 1 DataType Property called title (Domain:Document Range:Literal).

Following are the Samples for the properties which I have created

  1. BT hasDocument Document
  2. Document topic BT
  3. Document title "TestingName"

I dont know how to create a property which infers the following result

BT newProperty "TestingName"

Rony
  • 1
  • 2
  • Duplicated on http://answers.semanticweb.com as [Inference OWL](http://answers.semanticweb.com/questions/26526/inference-owl). – Joshua Taylor Feb 18 '14 at 18:15

1 Answers1

0

If I understand your question, you're looking to be able to infer from

docX topic someTopic 
docX title "SampleTitle"
someTopic hasDocumentWithTitle "SampleTitle"

You could almost do this with an property chain, by asserting that hasDocumentWithTitle has as a subproperty the chain (inverse topic) o title. Unfortunately, in OWL property chains can't end with datatype properties, so you can't do this. However, you can use SWRL rules, and many OWL2 reasoners process SWRL rules. You'd use a rule of the form:

topic(?doc,?topic) ∧ title(?doc,?title) → hasDocumentWithTitle(?topic,?title)

For instance we can get the following result in Protege with the following ontology:

result in Protege

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rule-example="http://www.example.org/rule-example#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:swrl="http://www.w3.org/2003/11/swrl#"
    xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <owl:Ontology rdf:about="http://www.example.org/rule-example"/>
  <owl:Class rdf:about="http://www.example.org/rule-example#Document"/>
  <owl:Class rdf:about="http://www.example.org/rule-example#Topic"/>
  <owl:ObjectProperty rdf:about="http://www.example.org/rule-example#hasTopic"/>
  <owl:DatatypeProperty rdf:about="http://www.example.org/rule-example#hasTitle"/>
  <owl:DatatypeProperty rdf:about="http://www.example.org/rule-example#hasDocumentWithTitle"/>
  <owl:NamedIndividual rdf:about="http://www.example.org/rule-example#doc42">
    <rdf:type rdf:resource="http://www.example.org/rule-example#Document"/>
    <rule-example:hasTitle>Document Number Forty-Two</rule-example:hasTitle>
    <rule-example:hasTopic>
      <owl:NamedIndividual rdf:about="http://www.example.org/rule-example#topic101">
        <rdf:type rdf:resource="http://www.example.org/rule-example#Topic"/>
        <rule-example:hasTopic rdf:resource="http://www.example.org/rule-example#topic101"/>
      </owl:NamedIndividual>
    </rule-example:hasTopic>
  </owl:NamedIndividual>
  <swrl:Imp>
    <swrl:head>
      <swrl:AtomList>
        <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
        <rdf:first>
          <swrl:DatavaluedPropertyAtom>
            <swrl:propertyPredicate rdf:resource="http://www.example.org/rule-example#hasDocumentWithTitle"/>
            <swrl:argument2>
              <swrl:Variable rdf:about="urn:swrl#title"/>
            </swrl:argument2>
            <swrl:argument1>
              <swrl:Variable rdf:about="urn:swrl#topic"/>
            </swrl:argument1>
          </swrl:DatavaluedPropertyAtom>
        </rdf:first>
      </swrl:AtomList>
    </swrl:head>
    <swrl:body>
      <swrl:AtomList>
        <rdf:rest>
          <swrl:AtomList>
            <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
            <rdf:first>
              <swrl:DatavaluedPropertyAtom>
                <swrl:propertyPredicate rdf:resource="http://www.example.org/rule-example#hasTitle"/>
                <swrl:argument1>
                  <swrl:Variable rdf:about="urn:swrl#doc"/>
                </swrl:argument1>
                <swrl:argument2 rdf:resource="urn:swrl#title"/>
              </swrl:DatavaluedPropertyAtom>
            </rdf:first>
          </swrl:AtomList>
        </rdf:rest>
        <rdf:first>
          <swrl:IndividualPropertyAtom>
            <swrl:propertyPredicate rdf:resource="http://www.example.org/rule-example#hasTopic"/>
            <swrl:argument1 rdf:resource="urn:swrl#doc"/>
            <swrl:argument2 rdf:resource="urn:swrl#topic"/>
          </swrl:IndividualPropertyAtom>
        </rdf:first>
      </swrl:AtomList>
    </swrl:body>
  </swrl:Imp>
</rdf:RDF>
Sirko
  • 72,589
  • 19
  • 149
  • 183
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353