treat
植物と病気、およびプロパティ(植物treat
の病気)を含むオントロジーがあります。たくさんの植物と病気がありますが、今は 2 つ以上の植物の組み合わせで治療できる病気を追加したいと考えています。たとえば、次の文はどのように表現できますか?
病気 X は、植物 A と植物 B の組み合わせで治療できますが、植物 A または植物 B だけでは治療できません。
推論を使用してこれを取得することを考えていましたが、方法がわかりません。
ジョシュアの答えに代わるもの:ここでは植物のセットを参照しているため、病気と植物をOWLクラスとして表すことができます(自然界で見られる特定のインスタンスではありません)。次に、クラスを存在制限 ( some
- 生物学の一般的なパターン) にリンクできます。
前述のように、モデリングに補足ステップを導入する必要もあります。たとえば、植物は治療の成分であり、治療によって治療可能な病気です。
次に、次のコメント付き ( #
) オントロジー (マンチェスター構文) を検討すると、モデリングの公理について説明します。ファイルを保存して、Protege で開くことができます。
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: : <http://www.example.org/demo.owl#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Ontology: <http://www.example.org/demo.owl>
ObjectProperty: has-ingredient
ObjectProperty: treatableBy
Class: owl:Thing
Class: PlantA
SubClassOf:
Plant
Class: Treatment
#Your treatment obtained by mixing some
#of the plant B and some of the plant A
Class: TreatmentAB
SubClassOf:
Treatment,
(has-ingredient some PlantA)
and (has-ingredient some PlantB)
Class: PlantB
SubClassOf:
Plant
#This treatment has ingredient the plant A
Class: TreatmentA
SubClassOf:
has-ingredient some PlantA,
Treatment
#This treatment is made from plant B (among other things)
Class: TreatmentB
SubClassOf:
Treatment,
has-ingredient some PlantB
Class: Disease
Class: Plant
# This disease is treatable by the TreatmentAB
Class: DiseaseA
SubClassOf:
treatableBy some TreatmentAB,
Disease
Class: DiseaseB
SubClassOf:
treatableBy some TreatmentB,
Disease
ここで、オントロジーについて推論し、 のサブクラスを要求した場合、クラスtreatableBy some TreatmentA
は取得されません。期待どおりに式treatableBy some TreatmentAB
が返さDiseaseA
れます。