Same Individuals different classes

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Same Individuals different classes

walid87
Hi,
I'm using Protégé 5.5.
In my ontology, I have a class entitled "Casualties". this class has 2
subclasses: "Dead" and "Injury".
I want to create individuals for both Dead and Injury classes.
For instance, I want to create "25" as an individual for the class "Dead"
and "25" as an individual for the class "Injury". Well, I couldn't do that
since OWL doesn't allow 2 individuals have the same Value.
Is there any solution for this issue without creating datatype properties?
Best regards




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Same Individuals different classes

Dave McComb-2
When you say you want to create “25” as an individual, let me make sure I understand what you mean.

In semantics the URI refer to things in the “real world” so you will have a uri say yourNS:_person_25

The question is, is the dead person_25 the same as the injured person_25 (ie did they get injured and then die?) or are they different people?

If they are different people,  its a bit odd, and kind of relational thinking to think that 25 means one person in one context and a different person in another.

So if they are different people, then you will want a datatype property (not sure why you don’t want one). So let’s have the datatype property yourNS:nickname.  I’d say that you have yourNS:_dead_person_25 with yourNS:nickname “25” and yourNS:_injured_person_25 with yourNS:nicjname “25”

Although really that isn’t great, you should figure out a way to give people unique, permanent URIs and then just add the ref:type when they get injured or die.

> On Nov 6, 2019, at 9:50 AM, walid87 <[hidden email]> wrote:
>
> Hi,
> I'm using Protégé 5.5.
> In my ontology, I have a class entitled "Casualties". this class has 2
> subclasses: "Dead" and "Injury".
> I want to create individuals for both Dead and Injury classes.
> For instance, I want to create "25" as an individual for the class "Dead"
> and "25" as an individual for the class "Injury". Well, I couldn't do that
> since OWL doesn't allow 2 individuals have the same Value.
> Is there any solution for this issue without creating datatype properties?
> Best regards
>
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Same Individuals different classes

walid87
Thank you so much for your quick answer.
What I meant is that: the number of dead people=the number of injured
people=25.
An instance of the class "Dead" or the class "Injury" refers to the number
of people.
 
Normally, I should create a datatype property, for example,
"hasNumberOfDead" (datatype int), an individual of the class "Dead", for
example "dead1" with a datatype property assertion (DataProperty:
hasNumberOfDead; Value: 25)

When you said: "In semantics the URI refer to things in the “real world”", I
realized that I was wrong to think like this.

Thank you Sir




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Same Individuals different classes

smrUSGIN
What might make more sense is  for casualtyCount to be a property of an event, with sub properties 'numberDead' and 'numberInjured'

-----Original Message-----
From: protege-user <[hidden email]> On Behalf Of walid87
Sent: Wednesday, November 6, 2019 12:11 PM
To: [hidden email]
Subject: Re: [protege-user] Same Individuals different classes

Thank you so much for your quick answer.
What I meant is that: the number of dead people=the number of injured people=25.
An instance of the class "Dead" or the class "Injury" refers to the number of people.
 
Normally, I should create a datatype property, for example, "hasNumberOfDead" (datatype int), an individual of the class "Dead", for example "dead1" with a datatype property assertion (DataProperty:
hasNumberOfDead; Value: 25)

When you said: "In semantics the URI refer to things in the “real world”", I realized that I was wrong to think like this.

Thank you Sir




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Same Individuals different classes

Michael DeBellis-2
In reply to this post by walid87
I agree with everything Dave said but I just want to add: there is no reason you can't have the same individual be an instance of the class Dead and Injury unless you have specified that Dead and Injury are disjoint classes. Other things being equal I would tend to think that those two classes would be disjoint but it's really all up to you to model your domain as you like. Also, you can have two different individuals but give them the same label annotation (e.g., "25") and in the UI they will show up (very confusingly but if this is what you really want) as both being 25 even though they are different individuals. See the attached little demo ontology. I have three Individuals: Person25, Person26, Person27. They all have the label "25" so they all show up in the UI as 25. Person25 and Person26 are instances of Dead and Injured respectively and Person27 is an instance of both. Of course if you defined Dead and Injured as disjoint classes then you would have to change Person27 or you would get an error. If you want to see the actual names (last part of the IRI) for any individual just remove the label annotation for it. 

Also, it sounds like what you really want is a data property anyway, if you want the info that somehow the number 25 is associated with the individual that should be a data property it's usually not a good idea to put that kind of info into the name of the object. But in case you really do want to do it, hopefully this will help. 

Michael


On Wed, Nov 6, 2019 at 9:49 AM walid87 <[hidden email]> wrote:
Hi,
I'm using Protégé 5.5.
In my ontology, I have a class entitled "Casualties". this class has 2
subclasses: "Dead" and "Injury".
I want to create individuals for both Dead and Injury classes.
For instance, I want to create "25" as an individual for the class "Dead"
and "25" as an individual for the class "Injury". Well, I couldn't do that
since OWL doesn't allow 2 individuals have the same Value.
Is there any solution for this issue without creating datatype properties?
Best regards




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

NamingExample.owl (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Same Individuals different classes

Michael DeBellis-2
In reply to this post by walid87
I left my previous message before I saw your reply. So IMO you definitely don't want to model the total number of a class as an individual of that class. That's a hack. An instance of Person (or any class) should be a Person not some meta information about that class. There are several other ways to model it, I agree with Stephen that if you have events you can associate the number of dead and injured as data properties of that event. Another way would be to use Punning. You can create instances with the same name as a class and you can then associate data about the class as a whole with that instance. It's a very limited form of what is called a meta-object protocol in object-oriented languages, e.g., class variables in Java. So you could create individuals called Dead and Injured and this wouldn't cause a problem even if you have classes with that same name, OWL and Protege will know you are punning. You could even create a class called MetaClass and define the data property classCount to have domain MetaClass and range xsd:integer and then make your punned instances instances of MetaClass and you could then associate the total number of individuals of each class with the classCount for the punned individual for that class. See:  https://www.w3.org/TR/owl2-new-features/#F12:_Punning  for more on Punning. 

Michael

On Wed, Nov 6, 2019 at 11:09 AM walid87 <[hidden email]> wrote:
Thank you so much for your quick answer.
What I meant is that: the number of dead people=the number of injured
people=25.
An instance of the class "Dead" or the class "Injury" refers to the number
of people.

Normally, I should create a datatype property, for example,
"hasNumberOfDead" (datatype int), an individual of the class "Dead", for
example "dead1" with a datatype property assertion (DataProperty:
hasNumberOfDead; Value: 25)

When you said: "In semantics the URI refer to things in the “real world”", I
realized that I was wrong to think like this.

Thank you Sir




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Same Individuals different classes

walid87
Thank you so much Mr. Michael for your precious replies. I really appreciate
your advices. :-)
Also thank you so much Mr. Stephen :-)



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user