1

Protege と SWRL タブを使用して、以下で説明するオントロジーを作成しました。TestClassとClass で構成されておりShadow、 where にTestは 3 つの個体がありt1, t2, t3ます。Shadowの既存の個体ごとにクラスの個体を作成する SWRL ルールを定義しようとしていましたが、ルールは次のとおりTestです。

Test(?x) ^ swrlx:makeOWLThing(?new, ?x) -> Shadow(?new)

質問:

  1. の 3 人 ( に対応) ではなくShadow、 という名前の 1 人だけが作成されます。fredt1, t2, t3
  2. 常に命名されている結果の個人の命名を制御する方法はfred?

    Prefix(:=<http://www.semanticweb.org/hilal/ontologies/2016/5/untitled-    ontology-58#>)
    Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
    Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
    Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
    Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
    Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)                
    Ontology(<http://www.semanticweb.org/hilal/ontologies/2016/5/untitled- ontology-58>
    
    Declaration(Class(:Shadow))
    Declaration(Class(:Test))
    Declaration(NamedIndividual(:t1))
    Declaration(NamedIndividual(:t2))
    Declaration(NamedIndividual(:t3))
    Declaration(AnnotationProperty(<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled>))
    
    
    
    ############################
    #   Named Individuals
    ############################
    
    # Individual: :t1 (:t1)
    
    ClassAssertion(:Test :t1)
    
    # Individual: :t2 (:t2)
    
    ClassAssertion(:Test :t2)
    
    # Individual: :t3 (:t3)
    
    ClassAssertion(:Test :t3)
    
    
    DLSafeRule(Annotation(<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled> "true"^^xsd:boolean) Annotation(rdfs:comment ""^^xsd:string) Annotation(rdfs:label "S1"^^xsd:string) Body(BuiltInAtom(<http://swrl.stanford.edu/ontologies/built-ins/3.3/swrlx.owl#makeOWLThing> Variable(<new>) Variable(<x>)) ClassAtom(:Test Variable(<x>)))Head(ClassAtom(:Shadow Variable(<new>))))
    )
    
4

2 に答える 2

0

SWRL ルールは、DL Safe 条件を理解している限り、新しい個人を作成することはできません。

于 2016-06-26T13:36:54.850 に答える