How to express numerical intervals in a data type property in an ontology?

I am trying to create a datatype property that accepts and recognizes numeric intervals. For example, let's say I have the property β€œtemperature”. In ontology, I want to create 2 additional properties "hot" and "cold". Hot temperature is 20-30 and cold 0-19. What I'm doing at the moment has some properties set as lowerlim and upperlim. But is there a more convenient way to express intervals directly through property? Therefore, when I request, for example, "23", it recognizes it as "hot." Any tips?

Thank you in advance

+4
source share
1 answer

In OWL, this is fairly straightforward, but the conclusions you expect may be slightly different from those that I will now explain.

In OWL, you can define restrictions on data type properties (as I showed earlier ).

Nevertheless, a discussion about a data type is necessary in order to deduce that a certain resource / individual with a certain value of a data type belongs to some class. Note that not all smart solution implementations support this, however I will focus on the Pellet that does.

To demonstrate, I will create a small OWL ontology. I will write this in OWL / XML syntax. It will be a long time, but I hope I will explain how this is done.

First, define a " reified " class with the name Temp:

<Declaration>
    <Class IRI="#Temp"/>
</Declaration>

, Hot Cold:

<Declaration>
    <Class IRI="#Hot"/>
</Declaration>

<SubClassOf>
    <Class IRI="#Hot"/>
    <Class IRI="#Temp"/>
</SubClassOf>

<Declaration>
    <Class IRI="#Cold"/>
</Declaration>

<SubClassOf>
    <Class IRI="#Cold"/>
    <Class IRI="#Temp"/>
</SubClassOf>

, tempDegC:

<Declaration>
    <DataProperty IRI="#tempDegC"/>
</Declaration>

, , :

<Declaration>
    <NamedIndividual IRI="#x"/>
</Declaration>

<DataPropertyAssertion>
    <DataProperty IRI="#tempDegC"/>
    <NamedIndividual IRI="#x"/>
    <Literal datatypeIRI="&xsd;double">13.5</Literal>
</DataPropertyAssertion>

<Declaration>
    <NamedIndividual IRI="#y"/>
</Declaration>

<DataPropertyAssertion>
    <DataProperty IRI="#tempDegC"/>
    <NamedIndividual IRI="#y"/>
    <Literal datatypeIRI="&xsd;double">23.4</Literal>
</DataPropertyAssertion>

, , x y , tempDegC xsd:double.

, .

, , x Cold, y Hot.

, Cold Hot tempDegC :

<EquivalentClasses>
    <Class IRI="#Cold"/>
    <DataSomeValuesFrom>
        <DataProperty IRI="#tempDegC"/>
        <DatatypeRestriction>
            <Datatype abbreviatedIRI="xsd:double"/>
            <FacetRestriction facet="&xsd;maxInclusive">
                <Literal datatypeIRI="&xsd;double">19.0</Literal>
            </FacetRestriction>
        </DatatypeRestriction>
    </DataSomeValuesFrom>
</EquivalentClasses>

Cold " , tempDegC xsd:double <= 19 ".

Hot :

<EquivalentClasses>
    <Class IRI="#Hot"/>
    <DataSomeValuesFrom>
        <DataProperty IRI="#tempDegC"/>
        <DatatypeRestriction>
            <Datatype abbreviatedIRI="xsd:double"/>
            <FacetRestriction facet="&xsd;maxInclusive">
                <Literal datatypeIRI="&xsd;double">30.0</Literal>
            </FacetRestriction>
            <FacetRestriction facet="&xsd;minExclusive">
                <Literal datatypeIRI="&xsd;double">19.0</Literal>
            </FacetRestriction>
        </DatatypeRestriction>
    </DataSomeValuesFrom>
</EquivalentClasses>

Hot " , tempDegC xsd:double > 19 <= 30 ".

, , :

x: Cold

y: Hot

EquivalentClasses Cold Hot. EquivalentClasses SubClassOf, , tempdegC .

, SubClassOf Cold Hot , Cold Hot , , .

, EquivalentClasses , : () , , , - (, x y) , . , , , x: Cold y: Hot.

. Protege , Pellet.

, HermiT FaCT++, , , , .

+8

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


All Articles