Protege/Turtle/OWL在使具体化语句的对象属性发挥作用方面存在困难



假设我想表示Bill每周锻炼一次。我想探索在owl中表示这一点的各种方法,因为我越来越熟悉在owl和turtle中构建本体论。我愿意听取其他代表的意见,但这是我想要的:

  1. ActivityType是一个类
  2. 练习就是那个类的一个例子
  3. 比尔是人类(一个阶级(的一个例子,他进行锻炼的活动
  4. 然后,我想把比尔的表现定性为每周发生一次的事情
  5. 为此,我创建了一个Frequencies类和一个名为OnceAWeek的实例
  6. 然后,我想具体化比尔的运动表现,并将具体化的猫头鹰句子与OnceAWeek频率联系起来

以下是我的尝试方式(我将省略一些上层本体的内容,但这不应该是任何问题所在(:

:performsActivityType rdf:type owl:ObjectProperty;
rdfs:Domain :Animal;
rdfs:Range :ActivityType.
:performsWithFrequency rdf:type owl:ObjectProperty;
rdfs:Domain owl:Axiom;
rdfs:Range :Frequency.
:Human rdf:type owl:Class ;
rdfs:subClassOf :Animal.

:ActivityType rdf:type owl:Class .
:Frequency rdf:type owl:Class .
:Exercise rdf:type owl:NamedIndividual, :ActivityType.
:OnceAWeek rdf:type owl:NamedIndividual, :Frequency.
:Bill rdf:type :Human;
:performsActivityType :Exercise.
[rdf:type owl:NamedIndividual, owl:Axiom ;
owl:annotatedSource :Bill;
owl:annotatedProperty :performsActivityType;
owl:annotatedTarget :Exercise;
:performsWithFrequency :OnceAWeek].

问题是:当我这样做的时候,我无法通过在Protege中查看来验证我是否添加了预期的知识。我可以验证我正在创建/具体化正确的Axiom,因为我可以偷偷进入类似";rdfs:label";他每周做一次"当我在Protege中打开.owl文件时,它会注释断言并可见。但我找不到一种方法来验证我是否对(Bill performsActivityType Exercise(这句话提出了:performsWithFrequency的说法。

帮助?

(同样,我们也欢迎思考如何更好地实现这一代表性,尽管如果可能的话,我仍然想学习如何处理这一问题(。

在设计本体时,根据您想要做出的推断进行思考通常是有帮助的。在你的情况下,假设我们希望能够根据人们的活动水平对他们进行分类。我们可以做以下事情:

:hasExerciseFrequency rdf:type owl:DatatypeProperty ;
rdfs:range xsd:integer .
:HighlyActivePerson rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Restriction ;
owl:onProperty :hasExerciseFrequency ;
owl:someValuesFrom [ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:integer ;
owl:withRestrictions ( [ xsd:minInclusive 7
                ]
              )
]
] ;
rdfs:subClassOf :Person .

:ModeratelyActivePerson rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Restriction ;
owl:onProperty :hasExerciseFrequency ;
owl:someValuesFrom [ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:integer ;
owl:withRestrictions ( [ xsd:minInclusive 3
                    ]
                    [ xsd:maxInclusive 6
                    ]
                  )
]
] ;
rdfs:subClassOf :Person .
:Person rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Restriction ;
owl:onProperty :hasExerciseFrequency ;
owl:someValuesFrom xsd:integer
] .
:SedentaryPerson rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Restriction ;
owl:onProperty :hasExerciseFrequency ;
owl:someValuesFrom [ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:integer ;
owl:withRestrictions ( [ xsd:maxInclusive 0
             ]
           )
]
] ;
rdfs:subClassOf :Person .
:SlightlyActivePerson rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Restriction ;
owl:onProperty :hasExerciseFrequency ;
owl:someValuesFrom [ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:integer ;
owl:withRestrictions ( [ xsd:minInclusive 1
                  ]
                  [ xsd:maxInclusive 2
                  ]
                )
]
] ;
rdfs:subClassOf :Person .
:ann rdf:type owl:NamedIndividual ;
:hasExerciseFrequency 10 .
:dave rdf:type owl:NamedIndividual ;
:hasExerciseFrequency 0 .
:pete rdf:type owl:NamedIndividual ;
:hasExerciseFrequency 3 .
[ rdf:type owl:AllDisjointClasses ;
owl:members ( :HighlyActivePerson
:ModeratelyActivePerson
:SedentaryPerson
)
] .

如果您将其加载到Protege中并运行推理器,它会将ann归类为高度活跃,pete归类为中度活跃,而dave归类为久坐。

我在我的论文中谈到了你可以做到这一点的方法,你可以从这里下载。

啊。我想我看到了问题所在。我需要将:performsWithFrequency设置为owl:AnnotationProperty,而不是owl:ObjectProperty。一旦我做出了改变,事情就会如预期的那样运转。

不过,我很感激人们对这种方法有任何进一步的想法。或者,如果我误解了对象属性和注释属性在这里的工作方式。

最新更新