Protege と SWRL タブを使用して、以下で説明するオントロジーを作成しました。Test
ClassとClass で構成されておりShadow
、 where にTest
は 3 つの個体がありt1, t2, t3
ます。Shadow
の既存の個体ごとにクラスの個体を作成する SWRL ルールを定義しようとしていましたが、ルールは次のとおりTest
です。
Test(?x) ^ swrlx:makeOWLThing(?new, ?x) -> Shadow(?new)
質問:
- の 3 人 ( に対応) ではなく
Shadow
、 という名前の 1 人だけが作成されます。fred
t1, t2, t3
常に命名されている結果の個人の命名を制御する方法は
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>)))) )