要求个人的财产价值是他人财产的超集? [英] Require individual's property values to be a superset of another's?

查看:101
本文介绍了要求个人的财产价值是他人财产的超集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用以下类,属性和具有对象属性断言的个人定义了一个本体:

Class: Employee > Individuals: { EmployeeA }
Class: Skill > Individuals: { Skill1, Skill2, Skill3 }
Class: Job > Individuals: { DBA }

hasSkill > Domain (Employee) and Range (Skill)
isAskillBy > Domain (Skill) and Range (Employee) <inverse of hasSkill>
requireSkill > Domain (Job) and Range (Skill)
isAskillrequiredBy > Domain (Skill) and Range (Job) <inverse of requireSkill>

Individual: EmployeeA, object property assertion: hasSkill Skill1 
                                                  hasSkill Skill2
                     , types : hasSkill only ({Skill1,Skill2}) <to close OWA
                     , Negative object property assertion: hasSkill Skill3

Individual: DBA, object property assertion: requireSkill Skill1 
                                             requireSkill Skill2
                                             requireSkill Skill3

       , types : requireSkill only ({Skill1,Skill2, Skill3}) <to close OWA

要分类员工是否符合工作条件(在本例中为DBA职位),我创建了 Fit 类,并将其等同于:

Employee and (hasSkill only (isAskillrequiredBy value DBA))

当我在Protege中运行推理机时,推理机将 EmployeeA 归类为 Fit ,但具有用于解决开放世界假设(OWA)的闭包公理, EmployeeA 不应归类为 Fit ,因为他没有DBA职位所需的全部三项技能.

解决方案

首先,回顾一下OWL中通用"量化的含义.类表达式

    p仅C

是个体x,如果 if x通过属性p与y相关,则 then y必须是C.也就是说,p(x,y)意味着C(y).您的查询返回的是正确的结果,但查询并不完全代表您想要的含义.查询

雇员和(仅具有技能(isAskillrequiredBy值DBA))

说某物必须是雇员,并且如果该雇员具有技能,那么然后该技能必须是DBA职位所需的技能. EmployeeA当然满足了这个定义,因为EmployeeA拥有的技能是Skill1和Skill2,这两个技能对于DBA职位都是必需的.

此查询中的问题是.它将以两种不同的方式体现出来:(i)如果某人具备DBA职位的资格(即具有所有必要的技能),但又具有其他技能,那么您将不会找回它们,因为他们拥有 > DBA职位不需要的技能(但也许您不希望合格的人员); (ii)检索DBA职位所需的所有技能的人,但并不要求人们实际上具有DBA职位所需的所有技能.

您真正想要的是具有DBA职位所需的所有技能的人员.您需要检查的是个人是否缺乏 DBA所需的任何技能.可以从以下位置找到DBA职位所需的技能:

   (相反 requireSkill) DBA

DBA不需要的技能仅仅是对它的否定:

                  —

您想说的是,个人没有拥有的任何技能都必须来自该班.当前,您没有将个人与他们没有所拥有的技能联系起来的属性.如果您这样做了,则可以将"Fit"类定义为

   员工(仅缺乏技能(((<反之 ) DBA)))

现在,问题是您是否可以定义属性 lacksSkill ,当雇员没有技能时,该属性是否正确?我不确定是否可以完全做到这一点,但是您可以定义

    lacksSkill disjointProperty hasSkill

这意味着如果 hasSkill(x,y)为true,则 lacksSkill(x,y)必须为false.这与否定并不完全相同,因为它们都可以同时为 false ,但是不能同时为真.

足以使此查询正常工作,并且它消除了对某些闭合公理的需要.您仍然需要关闭职位所需的内容,但不需要关闭员工的技能.也就是说,您不需要说,例如,EmployeeA仅具有技能1,技能2.我在Protege中创建了一个本体,您可以用来查看其实际效果.它有一个拥有技能1和技能2(不足以胜任这份工作)的 EmployeeA ,和一个拥有全部三项技能(足以胜任该职位)的 EmployeeB . >

 @prefix :      <http://example.org/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix example: <http://example.org/> .

example:Skill  a  owl:Class .

example:Position  a  owl:Class .

example:Skill3  a  owl:NamedIndividual , example:Skill .

example:hasSkill  a               owl:ObjectProperty ;
        owl:propertyDisjointWith  example:lacksSkill .

example:requiresSkill
        a       owl:ObjectProperty .

example:  a     owl:Ontology .

example:DBA  a                 owl:NamedIndividual , example:Position ;
        a                      [ a                  owl:Restriction ;
                                 owl:allValuesFrom  [ a          owl:Class ;
                                                      owl:oneOf  ( example:Skill3 example:Skill2 example:Skill1 )
                                                    ] ;
                                 owl:onProperty     example:requiresSkill
                               ] ;
        example:requiresSkill  example:Skill1 , example:Skill2 , example:Skill3 .

example:Skill2  a  owl:NamedIndividual , example:Skill .

example:Employee  a  owl:Class .

example:EmployeeA  a      owl:NamedIndividual , example:Employee ;
        example:hasSkill  example:Skill1 , example:Skill2 .

example:Skill1  a  owl:NamedIndividual , example:Skill .

example:lacksSkill  a  owl:ObjectProperty .

example:EmployeeB  a      owl:NamedIndividual , example:Employee ;
        example:hasSkill  example:Skill1 , example:Skill2 , example:Skill3 .
 

I have defined an ontology with the following classes, properties, and individuals with object property assertions:

Class: Employee > Individuals: { EmployeeA }
Class: Skill > Individuals: { Skill1, Skill2, Skill3 }
Class: Job > Individuals: { DBA }

hasSkill > Domain (Employee) and Range (Skill)
isAskillBy > Domain (Skill) and Range (Employee) <inverse of hasSkill>
requireSkill > Domain (Job) and Range (Skill)
isAskillrequiredBy > Domain (Skill) and Range (Job) <inverse of requireSkill>

Individual: EmployeeA, object property assertion: hasSkill Skill1 
                                                  hasSkill Skill2
                     , types : hasSkill only ({Skill1,Skill2}) <to close OWA
                     , Negative object property assertion: hasSkill Skill3

Individual: DBA, object property assertion: requireSkill Skill1 
                                             requireSkill Skill2
                                             requireSkill Skill3

       , types : requireSkill only ({Skill1,Skill2, Skill3}) <to close OWA

To classify whether an Employee is qualified for a job (in this case, the DBA position), I created the class Fit and made it equivalent to:

Employee and (hasSkill only (isAskillrequiredBy value DBA))

When I run a reasoner in Protege, the reasoner classifies EmployeeA under the class Fit, but with the closure axioms to address the Open World Assumption (OWA), EmployeeA should not be classified as Fit, since he does not have all three skills needed for the DBA position.

解决方案

First, recall what the "universal" quantification in OWL means. The class expression

    p only C

is the individuals x such that if x is related to y by property p, then y must be a C. That is, p(x,y) implies C(y). Your query is returning the correct results, but the query doesn't mean exactly what you want it to mean. The query

Employee and (hasSkill only (isAskillrequiredBy value DBA))

says that something must be an Employee, and if the employee has a skill, then the skill must be one that is required by the DBA position. EmployeeA certainly meets that definition, since the skills that EmployeeA has are Skill1 and Skill2, both of which are required for the DBA position.

The problem in this query is the only. It will manifest in two different ways: (i) if someone is qualified for DBA position (i.e., has all the necessary skills), but has additional skills, then you won't retrieve them, since they have skills that aren't required for the DBA position (but maybe you don't want overqualified people); and (ii) it retrieves people all of whose skills are required for the DBA position, but doesn't require that the people actually have all the skills needed for the DBA position.

What you actually want to ask for is individuals that have all the skills necessary for the DBA position. What you'd need to check is whether an individual lacks any skills that are required for the DBA. The skills required for the DBA position can be found with:

    (inverse requiresSkill) value DBA

The skills not needed for the DBA are simply the negation of that:

    not ((inverse requiresSkill) value DBA)

What you'd like to say is that any skills that an individual doesn't have must be from that class. Currently, you don't have a property that connects an individual to the skills that they don't have. If you did, then you could define your "Fit" class as

    Employee and (lacksSkill only (not ((inverse requiresSkill) value DBA)))

Now, the question is whether you can define a property lacksSkill that's true exactly when an employee doesn't have a skill. I'm not sure whether you can do exactly that, but you can define

    lacksSkill disjointProperty hasSkill

which will mean that if hasSkill(x,y) is true, then lacksSkill(x,y) must be false. It's not exactly the the same as a negation, because they can both be false at the same time, but they can't both be true.

That's enough to make this query work, and it removes the need for some of the closure axioms. You'll still need to close what the position requires, but you don't need to close the skills of the employees. That is, you don't need to say, e.g., that EmployeeA has only the skills Skill1, Skill2. I created an ontology in Protege that you can use to see this in action. It has an EmployeeA who has Skill1 and Skill2 (not enough to qualify for the job), and an EmployeeB who has all three skills, which is enough to qualify.

@prefix :      <http://example.org/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix example: <http://example.org/> .

example:Skill  a  owl:Class .

example:Position  a  owl:Class .

example:Skill3  a  owl:NamedIndividual , example:Skill .

example:hasSkill  a               owl:ObjectProperty ;
        owl:propertyDisjointWith  example:lacksSkill .

example:requiresSkill
        a       owl:ObjectProperty .

example:  a     owl:Ontology .

example:DBA  a                 owl:NamedIndividual , example:Position ;
        a                      [ a                  owl:Restriction ;
                                 owl:allValuesFrom  [ a          owl:Class ;
                                                      owl:oneOf  ( example:Skill3 example:Skill2 example:Skill1 )
                                                    ] ;
                                 owl:onProperty     example:requiresSkill
                               ] ;
        example:requiresSkill  example:Skill1 , example:Skill2 , example:Skill3 .

example:Skill2  a  owl:NamedIndividual , example:Skill .

example:Employee  a  owl:Class .

example:EmployeeA  a      owl:NamedIndividual , example:Employee ;
        example:hasSkill  example:Skill1 , example:Skill2 .

example:Skill1  a  owl:NamedIndividual , example:Skill .

example:lacksSkill  a  owl:ObjectProperty .

example:EmployeeB  a      owl:NamedIndividual , example:Employee ;
        example:hasSkill  example:Skill1 , example:Skill2 , example:Skill3 .

这篇关于要求个人的财产价值是他人财产的超集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆