您可以使用 OWL 2 函数式语法根据另一个人的属性来断言对象属性吗?

问题描述 投票:0回答:1

假设我们有以下声明:

Declaration(ObjectProperty(:likes))

Declaration( NamedIndividual(:John))
Declaration( NamedIndividual(:George) )
Declaration( NamedIndividual(:Fishing))

以及以下断言:

ObjectPropertyAssertion(:likes :John :Fishing)

有没有办法断言乔治不喜欢约翰喜欢的任何东西?

我想到了以下几点:

NegativeObjectPropertyAssertion(
  :likes
  :George
  ObjectHasValue(
     ObjectInverseOf(:likes)
     :John
  )
)

但是我无法在 Protege 中加载上述本体,所以我认为语法不正确。

owl protege
1个回答
0
投票

ObjectPropertyAssertions(分别为 NegativeObjectPropertyAssertions)只能对 2 个个体之间关系的存在(分别为不存在)做出断言。您想要做的是使用属性断言定义个体和类之间的关系。这是不可能的。

但是,您可以定义

john
喜欢的事物类别,如下所示:

EquivalentClasses(JohnLikes ObjectSomeValuesFrom(ObjectInverseOf(likes>) ObjectOneOf(john))) 

请注意,如果您希望列出

john
喜欢的活动,则必须为班级
ObjectSomeValuesFrom(ObjectInverseOf(likes>) ObjectOneOf(john))
指定名称 - 在本例中为
JohnLikes
。这是因为推理器仅对命名类而不是匿名类进行推断。

那么

george
喜欢的活动将是
john
不喜欢的活动(即
not JohnLikes
)。

这里是一个示例本体,定义了一些已知的活动以及

john
喜欢和不喜欢的活动:

Ontology(<http://www.semanticweb.org/SO77732178>

Declaration(Class(<http://www.semanticweb.org/SO77732178#Activity>))
Declaration(Class(<http://www.semanticweb.org/SO77732178#GeorgeLikes>))
Declaration(Class(<http://www.semanticweb.org/SO77732178#JohnLikes>))
Declaration(Class(<http://www.semanticweb.org/SO77732178#Person>))
Declaration(ObjectProperty(<http://www.semanticweb.org/SO77732178#likes>))
Declaration(NamedIndividual(<http://www.semanticweb.org/SO77732178#chess>))
Declaration(NamedIndividual(<http://www.semanticweb.org/SO77732178#fishing>))
Declaration(NamedIndividual(<http://www.semanticweb.org/SO77732178#george>))
Declaration(NamedIndividual(<http://www.semanticweb.org/SO77732178#hiking>))
Declaration(NamedIndividual(<http://www.semanticweb.org/SO77732178#john>))
Declaration(NamedIndividual(<http://www.semanticweb.org/SO77732178#reading>))

############################
#   Classes
############################

# Class: <http://www.semanticweb.org/SO77732178#Activity> (<http://www.semanticweb.org/SO77732178#Activity>)

EquivalentClasses(<http://www.semanticweb.org/SO77732178#Activity> ObjectOneOf(<http://www.semanticweb.org/SO77732178#chess> <http://www.semanticweb.org/SO77732178#fishing> <http://www.semanticweb.org/SO77732178#hiking> <http://www.semanticweb.org/SO77732178#reading>))
DisjointClasses(<http://www.semanticweb.org/SO77732178#Activity> <http://www.semanticweb.org/SO77732178#Person>)

# Class: <http://www.semanticweb.org/SO77732178#GeorgeLikes> (<http://www.semanticweb.org/SO77732178#GeorgeLikes>)

EquivalentClasses(<http://www.semanticweb.org/SO77732178#GeorgeLikes> ObjectComplementOf(<http://www.semanticweb.org/SO77732178#JohnLikes>))

# Class: <http://www.semanticweb.org/SO77732178#JohnLikes> (<http://www.semanticweb.org/SO77732178#JohnLikes>)

EquivalentClasses(<http://www.semanticweb.org/SO77732178#JohnLikes> ObjectSomeValuesFrom(ObjectInverseOf(<http://www.semanticweb.org/SO77732178#likes>) ObjectOneOf(<http://www.semanticweb.org/SO77732178#john>)))


############################
#   Named Individuals
############################

# Individual: <http://www.semanticweb.org/SO77732178#chess> (<http://www.semanticweb.org/SO77732178#chess>)

ClassAssertion(<http://www.semanticweb.org/SO77732178#Activity> <http://www.semanticweb.org/SO77732178#chess>)

# Individual: <http://www.semanticweb.org/SO77732178#fishing> (<http://www.semanticweb.org/SO77732178#fishing>)

ClassAssertion(<http://www.semanticweb.org/SO77732178#Activity> <http://www.semanticweb.org/SO77732178#fishing>)

# Individual: <http://www.semanticweb.org/SO77732178#george> (<http://www.semanticweb.org/SO77732178#george>)

ClassAssertion(<http://www.semanticweb.org/SO77732178#Person> <http://www.semanticweb.org/SO77732178#george>)

# Individual: <http://www.semanticweb.org/SO77732178#hiking> (<http://www.semanticweb.org/SO77732178#hiking>)

ClassAssertion(<http://www.semanticweb.org/SO77732178#Activity> <http://www.semanticweb.org/SO77732178#hiking>)

# Individual: <http://www.semanticweb.org/SO77732178#john> (<http://www.semanticweb.org/SO77732178#john>)

ClassAssertion(<http://www.semanticweb.org/SO77732178#Person> <http://www.semanticweb.org/SO77732178#john>)
ObjectPropertyAssertion(<http://www.semanticweb.org/SO77732178#likes> <http://www.semanticweb.org/SO77732178#john> <http://www.semanticweb.org/SO77732178#chess>)
ObjectPropertyAssertion(<http://www.semanticweb.org/SO77732178#likes> <http://www.semanticweb.org/SO77732178#john> <http://www.semanticweb.org/SO77732178#reading>)
NegativeObjectPropertyAssertion(<http://www.semanticweb.org/SO77732178#likes> <http://www.semanticweb.org/SO77732178#john> <http://www.semanticweb.org/SO77732178#fishing>)
NegativeObjectPropertyAssertion(<http://www.semanticweb.org/SO77732178#likes> <http://www.semanticweb.org/SO77732178#john> <http://www.semanticweb.org/SO77732178#hiking>)

# Individual: <http://www.semanticweb.org/SO77732178#reading> (<http://www.semanticweb.org/SO77732178#reading>)

ClassAssertion(<http://www.semanticweb.org/SO77732178#Activity> <http://www.semanticweb.org/SO77732178#reading>)


DifferentIndividuals(<http://www.semanticweb.org/SO77732178#chess> <http://www.semanticweb.org/SO77732178#fishing> <http://www.semanticweb.org/SO77732178#george> <http://www.semanticweb.org/SO77732178#hiking> <http://www.semanticweb.org/SO77732178#john> <http://www.semanticweb.org/SO77732178#reading>)
)
© www.soinside.com 2019 - 2024. All rights reserved.