Modeling OWL Data Type Property Constraints with a List of Values

I have a class called ResponseInformation that has a datatype property called hasResponseType, which should only have the following string values: "Accept", "Decline" and "Provisional".

I understand that I can model this as a set of individuals of the ResponseType class, which are then called accept, declend, and preliminary, respectively, and the owl: oneOf axiom, declaring that the ResponseType class is equivalent to exactly one of "this set of instances. However, I realized that OWL 2 supports lists of values ​​as ranges for data type properties. For example, I can specify the following as a range of the hasResponseType property in Protege: {"Accept", "Decline", "Provisional"}

This seems to be the easier of the two options, since it is not connected with the creation of additional classes, individuals, etc. I was interested to learn about possible compromises if I take the second option, i.e. is there any other advantage or disadvantage other than convenience?

0
source share
2 answers

I think Antoine Zimmerman 's answer describes how you can do this well enough. I agree that the efforts needed to implement the two approaches are similar. I expect, although I have not tested this, that some types of reasoning will be more efficient with respect to the data type parameter, since I expect that typed literals can be compared for equality and inequality much faster than people can be.

However, I think that I still suggest taking enumerated entities (so hasResponseType is an object property) for at least two reasons:

  • Atoine, , . , ( , , ), .
  • ( .) - , . , , , ,

    Accept a GuaranteedResponse
    Decline a not GuaranteedResponse
    Provisional a not GuaranteedResponse
    

    , , not GuaranteedRepsonses . , ,

    Accept hasCode "x789"
    Decline hasCode "x234"
    Provisional hasCode "x900"
    

    :

    hasResponseCode subPropertyOf hasResponseType o hasCode
    

    , ResponseTypes , .

0

. 3 ; 3 . . , , , .

, , " " . , "", "" , , "" - , "D"! . , ? :

:ResponseType  a  owl:Class .
:accept  a  :ResponseType;
    rdfs:label  "Accept"@en, "Accepter"@fr;
    rdfs:comment "This response type indicates that the request is accepted."@en,
                 "Ce type de réponse indique que la requête est acceptée."@fr .
:decline  a  :ResponseType .
    rdfs:label  "Decline"@en, "Refuser"@fr;
    rdfs:comment  "..."@en, "..."@fr .
:provisional  a  :ResponseType .
    rdfs:label  "Provisional"@en, "Provisoire"@fr;
    rdfs:comment  "..."@en, "..."@fr .
[]  a  owl:AllDifferent;
    owl:members  ( :accept :decline :provisional ) .
:hasResponseType  a  owl:ObjectProperty;
    rdfs:range  :ResponseType .

, Accept, Deny Provisional , :

:ResponseType  rdfs:subClassOf  [
    a  owl:Class;
    owl:oneOf  ( :accept :decline :provisional )
] .

, :

:accept  a  owl:Thing .
:decline  a  owl:Thing .
:provisional  a  owl:Thing .
:hasResponseType  a  owl:ObjectProperty;
    rdfs:range  [
        a  owl:Class;
        owl:oneOf  ( :accept :decline :provisional )
    ] .

, , :

:hasResponseType  a  owl:DatatypeProperty;
    rdfs:range  [
        a  rdfs:Datatype;
        owl:oneOf  ( "Accept" "Decline" "Provisional" )
    ] .

, 3 , , .

+1

Source: https://habr.com/ru/post/1017291/


All Articles