ProtegeとSWRLタブを使用して、私は以下に述べるオントロジーを持っています。クラスTest
とクラスShadow
で構成されています。Test
には3個の個t1, t2, t3
があります。私はルールがswrlx:makeOWLThingは1つの個体しか作成していません
Test(?x)^swrlx:makeOWLThing(?new, ?x) -> Shadow(?new)
質問で、Test
の既存の各個人のShadow
クラスの個人を作成SWRLルールを定義しようとしていた:指定Shadow
の
- 唯一の個人、
fred
3つではなく(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>)))) )
既に、組み込み機能を使用しました。このリンクのswrlx:makeOWLThingを確認してください。http://wiki.ruleml.org/index.php/SWRL –
これをサポートする推論器はどれですか? – Ignazio
ペレット!私はprotege 5でPelletを使用しています。これらのルールはSWRLタブで記述することができます。 –