W3C home > Mailing lists > Public > public-owl-dev@w3.org > October to December 2009

RE: Inference of class type based on keyword and Modeling data types

From: Saiprasad, Sundar <Sundar_Saiprasad@intuit.com>
Date: Wed, 30 Dec 2009 11:47:50 +0530
Message-ID: <1B75B268E6295D4586C218DF3C3847AC0180F3ED@banex02.corp.intuit.net>
To: "Thomas Schneider" <schneidt@cs.man.ac.uk>, <public-owl-dev@w3.org>
Thomas


Thanks a ton for your response. My use case is a bit unique. The animal
example is an analogy for my actual use case and let me try to explain
it better. I will get a unique URI for an individual and a bunch of
keywords as input.  These keywords can be something like "Lion" ,
"Brown" , "500Kg" etc. I will get a bunch of keywords for each
individual. There can be many individuals. The keywords are available as
"hasKeyword" property from the individual.

I have a base class called Animal in my ontology and assume that the
first individual that I get as input has the URI urn:animal1234. I know
for sure that urn:annimal1234 is of type test:Animal. Every individual
is of type test:Animal.  There are subclasses of Animal like Carnivore ,
BrownAnimals , HeavyAnimals etc. Based on the keywords that I get for
each individual , each individual becomes a member of these subclasses
too. Your point is very valid. I can create something like the following

Test:CarnivoreText owl:equivalent [ a owl:Restriction ;
                                  Owl:onProperty  Test:hasKeyword ;
                                  Owl:hasValue "Lion" ]

Test:CarnivoreText rdfs:subclassof Test:Carnivore

This would mean if I get a keyword Lion for the individual , it will
also infer that the individual is a subclass of Carnivore.

Similar associations can be created for BrownAnimals and other classes
too. 
 

I would like to know if there is a way to list a bunch of keywords that
I can have as an enumerated datatype and if one of it matches , then the
class association is made. 

Basically , I don't want my application to code these rules and make the
associations. I want to express it in the data itself

Thanks
Sundar


-----Original Message-----
From: public-owl-dev-request@w3.org
[mailto:public-owl-dev-request@w3.org] On Behalf Of Thomas Schneider
Sent: Tuesday, December 29, 2009 4:51 PM
To: public-owl-dev@w3.org
Subject: Re: Inference of class type based on keyword and Modeling data
types

Hi Sundar,

On 29 Dec 2009, at 11:11, Saiprasad, Sundar wrote:

> Hi
>
> This is what I want to achieve
>
> Assume I have the following defined
>
> Test:Animal rdf:type owl:Class
> Test:hasKeyword rdf:type owl:DatatypeProperty Test:hasKeyword 
> rdf:domain Test:Animal Test:hasKeyword rdf:range  xsd:string 
> Test:Carnivore  rdfs:subclassof Test:Animal Test:Carnivore 
> rdfs:subClassOf [ a owl:Restriction ;
>                                  Owl:onProperty  Test:hasKeyword ;
>                                  Owl:hasValue "Lion" ]
	
Please note that your last statement says: "everything that is a
carnivore has a keyword 'Lion'".

> Now if I have the following instance
>
> Test:animal1234  rdf:type Test:Animal
> Test:animal1234  Test:hasKeyword  "Lion"
>
> I would like to infer Test:animal1234 rdf:type Test:Carnivore. This 
> didn't work for me. Am I missing something?

This only works if the above statement is the other way round:  
"everything that has a keyword 'Lion' is a carnivore".

> I would like to extend this further by having a set of strings  like 
> an enumerated type (For example , lion , tiger , wolf etc) as defined 
> in xsd and if the keyword matches one of it , the corresponding type 
> should get inferred. I would expect a change like the following to 
> support it :
> Test:Carnivore rdfs:subClassOf [ a owl:Restriction ;
>                                  Owl:onProperty  Test:hasKeyword ;
>                                  Owl:someValuesFrom  user-defined- 
> datatype that has the enumeration of all keywords ]
>
> If the data contains Test:animal1234  Test:hasKeyword "wolf"  , then 
> it should infer Test:animal1234 rdf:type Test:Carnivore
>
> Is this possible and if it is can it be modeled?

But why do you want to model "being a lion" via "has a keyword 'Lion'"?
Why not have classes Lion, Tiger etc., of which animal1234 may or may
not be an instance?

Cheers

Thomas

>
>
> How do I model such a user defined data type and refer to it?
>
>
> Thanks
> Sundar
>

+----------------------------------------------------------------------+
|  Dr Thomas Schneider                    schneider (at) cs.man.ac.uk  |
|  School of Computer Science       http://www.cs.man.ac.uk/~schneidt  |
|  Kilburn Building, Room 2.114                 phone +44 161 2756136  |
|  University of Manchester                                            |
|  Oxford Road                                             _///_       |
|  Manchester M13 9PL                                      (o~o)       |
+-----------------------------------------------------oOOO--(_)--OOOo--+

Skagway (n.)
   Sudden outbreak of cones on a motorway.

                   Douglas Adams, John Lloyd: The Deeper Meaning of Liff
Received on Wednesday, 30 December 2009 06:19:19 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 09:32:57 GMT