W3C home > Mailing lists > Public > semantic-web@w3.org > September 2014

Re: Property or class?

From: Pavel Klinov <pavel.klinov@uni-ulm.de>
Date: Mon, 1 Sep 2014 16:59:04 +0200
Message-ID: <CAG5JQxVEZ_NRaG_z9Tv3ds3ZM=L=wn2nZZcsyjAfn0pkO+fBeg@mail.gmail.com>
To: Diogo FC Patrao <djogopatrao@gmail.com>
Cc: "Eric Prud'hommeaux" <eric@w3.org>, Victor Porton <porton@narod.ru>, Hm Hrm <unixprog@googlemail.com>, "semantic-web@w3.org" <semantic-web@w3.org>
On Mon, Sep 1, 2014 at 4:39 PM, Diogo FC Patrao <djogopatrao@gmail.com> wrote:
> Hi Victor
>
> I faced a similar problem years ago and went with "X a P"; in my case, X is
> a patient instance and P a diagnosis. The alternative was "X :hasDiagnosis
> P". Some thoughts:
>
> X a P
> Pro: P can be modelled as a Class, which is adequate (diagnostics can be
> hierarchic), inference is fast
> Con: If I have other classes attributed to X, and want to know the
> subclasses related to diagnostic, It'll be more difficult (yet not
> impossible)
>
> X :hasDiagnosis P
> Pro: easier to query when several different diagnosis (see Con above)
> Con: I would need to create an instance for each diagnostic class (ie. flu a
> Flu, patient1 :hasDiagnosis flu), or relate the instance directly to the
> class (OWL-Full)

Hm, but what's wrong with modeling X as an instance of (:hasDiagnosis
some P), i.e. an instance of a complex class with an existential
restriction on :hasDiagnosis? Then you'd still model P as a class, you
will fit into the polynomial OWL EL profile (if you care about
reasoning performance), and you won't need to create an explicit
instance of P for every X.

If there are many Xs with a P-diagnosis, you could create a class
PDiagPatient SubClassOf (:hasDiagnosis some P) and then just say X a
PDiagPatient.

Cheers,
Pavel

PS. I'm using the Manchester syntax for (:hasDiagnosis some P), hope
the semantics is clear.

>
> Years ago, I was modelling a similar case (precedence of data sources), and
> found easier to work with comparative properties, such as:
>
> db1 :isMoreTrustableThan db2
>
> defining :isMoreTrustableThan as transitive, you can compare any instances
> (given there's a path db1 :isMoreTrustableThan ...  :isMoreTrustableThan
> dbn), however I couldn't get it to find the most trustable of all without
> resorting to SPARQL.
>
> Cheers,
>
>
>
>
>
>
> --
> diogo patrĂ£o
>
>
>
>
> On Mon, Sep 1, 2014 at 10:05 AM, Eric Prud'hommeaux <eric@w3.org> wrote:
>>
>> * Victor Porton <porton@narod.ru> [2014-09-01 15:28+0300]
>> > 01.09.2014, 10:07, "Hm Hrm" <unixprog@googlemail.com>:
>> > > On 08/31/2014 06:43 PM, Victor Porton wrote:
>> > >>  Suppose P is a precedence of operation X. Should I write "X a P ."
>> > >> or
>> > >>  "X :precedence P ." (in Turtle format)?
>> > >>
>> > >>  What are (dis)advantages of both variants?
>> > >
>> > > Assuming that the property should link instance P to instance X, both
>> > > of
>> > > class :Operation, then you should use "X :precedence P".
>> > >
>> > > "X a P", a shortcut for "X rdf:type P", would imply that P is an
>> > > rdf:Class and X an instance of said class P. Extending the semantics
>> > > of
>> > > 'rdf:type' and using an instance as a class seems a bad idea.
>> >
>> > P is a class (because I want rdf:subClassOf for properties.
>> >
>> > But I yet doubt whether an operation should be an instance of
>> > precedence.
>>
>> I wouldn't advise it, but you could always say that Addition is an
>> instance of a thing with precedence 2 and Multiplication ... 6 (from
>>
>> <http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Arithmetic_operators>).
>> My guess is that instead you want to model more like this:
>>
>>   :precedenceIncludes a owl:ObjectProperty .
>>   :PrecedenceAtLeast1 a owl:Class .
>>   :PrecedenceAtLeast2 rdfs:subClassOf a :PrecedenceAtLeast1 .
>>   :PrecedenceAtLeast3 rdfs:subClassOf a :PrecedenceAtLeast2 .
>>   # ...
>>   :Operation a owl:Class;
>>     rdfs:subClassOf [
>>       owl:onProperty :precedenceIncludes ;
>>       owl:someValuesFrom :PrecedenceAtLeast1
>>     ] .
>>   :Addition rdfs:subClassOf
>>       :Operation ,
>>       [ owl:onProperty :precedenceIncludes ;
>>         owl:someValuesFrom :PrecedenceAtLeast2 ]
>>   :Multiplication rdfs:subClassOf
>>       :Operation ,
>>       [ owl:onProperty :precedenceIncludes ;
>>         owl:someValuesFrom :PrecedenceAtLeast6 ]
>>
>> That way you can apply the T-box to an A-box (e.g. a parse graph over
>> which you are doing static analysis) and leverage inferences from the
>> ontology.
>>
>> > --
>> > Victor Porton - http://portonvictor.org
>> >
>>
>> --
>> -ericP
>>
>> office: +1.617.599.3509
>> mobile: +33.6.80.80.35.59
>>
>> (eric@w3.org)
>> Feel free to forward this message to any list for any purpose other than
>> email address distribution.
>>
>> There are subtle nuances encoded in font variation and clever layout
>> which can only be seen by printing this message on high-clay paper.
>>
>
Received on Monday, 1 September 2014 14:59:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:42:53 UTC