2014-02-18 2 views
0

저는이 온톨로지를 처음 사용합니다. 나는 지금 프로 테지를 사용하고 있습니다. BT와 Document라는 2 개의 클래스가 있습니다. 2 Object Property 1 주제 (도메인 : 문서, 범위 : BT) 2. hasDocument (주제의 역 특성)를 작성했습니다.추론 데이터 형식 속성

제목 (도메인 : 문서 범위 : 리터럴)이라는 1 개의 DataType 속성을 만들었습니다. 다음

내가

  1. BT hasDocument 문서를 생성 한 속성에 대한 샘플입니다
  2. 문서 주제 BT
  3. 문서 제목 "TestingName"내가 만드는 방법을 잘 모릅니다

다음 결과를 추론하는 속성

BT newProperty "Test ingName "

+0

는 HTTP에 중복 : //answers.semantic web.com [Inference OWL] (http://answers.semanticweb.com/questions/26526/inference-owl). –

답변

0

나는 당신의 질문을 이해한다면, 당신은 hasDocumentWithTitle은 하위 속성 체인으로 가지고 주장에 의해

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

당신은 거의 property 체인이 할 수있는 추론 할 수 찾고 (inverse topic) o title . 불행히도 OWL 속성 체인에서는 데이터 유형 속성으로 끝날 수 없으므로이를 수행 할 수 없습니다. 그러나 SWRL 규칙을 사용할 수 있으며 많은 OWL2 추리 기는 SWRL 규칙을 처리합니다. (? 문서, 주제) : 당신은 형식의 규칙을 사용하십시오 hasDocumentWithTitle →

주제 ∧ 제목 (? 문서, 제목) (? 주제, 제목) 예를 들어

우리는 다음과 같은 온톨로지와 Protege는에서 다음과 같은 결과를 얻을 수 있습니다 :

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>