Search Mailing List Archives
[protege-owl] Inference of class type based on keyword andModeling data types
Sundar_Saiprasad at intuit.com
Sat Jan 2 01:06:36 PST 2010
Thanks Thomas R.
Equivalence or the reverse action is good. That worked. Regarding Thomas
S's point , I had responded as to why I need to model it this way. Here
is the note
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
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
From: protege-owl-bounces at lists.stanford.edu
[mailto:protege-owl-bounces at lists.stanford.edu] On Behalf Of Thomas Russ
Sent: Friday, January 01, 2010 8:01 AM
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] Inference of class type based on keyword
andModeling data types
On Dec 29, 2009, at 3:24 AM, Thomas Schneider wrote:
> Hi Sundar,
> On 29 Dec 2009, at 11:11, Saiprasad, Sundar wrote:
>> 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".
So, you need to reverse the action.
Also, one often creates necessary and sufficient conditions by using
"equivalent classes". And you can accomplish that by using
owl:equivalentClass instead of rdfs:subClassOf to relate the
restriction to the class name.
But Thomas Schneider has a good point about just using the class
structure itself instead of adding the keywords and using them to
encode the class name as a string.
protege-owl mailing list
protege-owl at lists.stanford.edu
Instructions for unsubscribing:
More information about the protege-owl