Putting Data property restriction in Protege.

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

Putting Data property restriction in Protege.

Deepjyoti
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png>
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png> I am
working on an ontology.

Dances have performance type like Group  or Individual.

For this assumption there is a class "Dance" and a Data property
"performanceType".

Now here in the performanceType data property I wish to restrict the data
values to "Group" or "Individual" -any one of these two for a particular
Dance.

What would be the best approach to do this in Protege.

Currently I have put a data range restriction as shown in the image attached
herewith.



--
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: Putting Data property restriction in Protege.

Lorenz Buehmann
I don't understand why you would use literals instead of individuals.
You can't add any further information to literals.

And what means "best"? Best for what? What does not work now? Everything
in ontology modelling is use-case driven - only you know what happens
with data later on.

On 18.08.19 08:32, Deepjyoti wrote:

> <http://protege-project.136.n4.nabble.com/file/t377000/protege.png>
> <http://protege-project.136.n4.nabble.com/file/t377000/protege.png> I am
> working on an ontology.
>
> Dances have performance type like Group  or Individual.
>
> For this assumption there is a class "Dance" and a Data property
> "performanceType".
>
> Now here in the performanceType data property I wish to restrict the data
> values to "Group" or "Individual" -any one of these two for a particular
> Dance.
>
> What would be the best approach to do this in Protege.
>
> Currently I have put a data range restriction as shown in the image attached
> herewith.
>
>
>
> --
> 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: Putting Data property restriction in Protege.

Michael DeBellis-2
In reply to this post by Deepjyoti
.A common way to do what I think you want to do is to have an enumerated class. I.e., define a class called TypeOfDance, create the appropriate instances of TypeOfDance (Individual, Group) and in the Equivalent To field for TypeOfDance put the set {Individual, Group}. Then for performanceType you can make the range be TypeOfDance or you can put any numeric restriction you want on it (e.g. min 1, max 2).  If you look at the tutorial for building the Pizza ontology I think they have an example of defining and using an enumerated class. I think the way you were doing it with a string would work but as Lorenz said other things being equal making them objects rather than strings gives you more capability to do reasoning.

Michael



On Sat, Aug 17, 2019 at 11:32 PM Deepjyoti <[hidden email]> wrote:
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png>
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png> I am
working on an ontology.

Dances have performance type like Group  or Individual.

For this assumption there is a class "Dance" and a Data property
"performanceType".

Now here in the performanceType data property I wish to restrict the data
values to "Group" or "Individual" -any one of these two for a particular
Dance.

What would be the best approach to do this in Protege.

Currently I have put a data range restriction as shown in the image attached
herewith.



--
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: Putting Data property restriction in Protege.

Igor Toujilov-2

Here is even a more generic approach, which might help you in the future to extend the ontology without refactoring numerous already existing things (even if now you cannot see how the ontology will evolve).

The general principle here is: if the things are likely to be extended in the future, use classes instead of individuals. It is because you can subclass or superclass the classes, not individuals.

So, introduce classes group_performance and individual_performance with superclass "performance". You even might want making "dance" a subclass of "performance". In this case it may be you even do not need a property (just assert group_performance and/or individual_performance for a dance individual). However you can use the similar approach with the object property as well.


Cheers,
Igor

 

 
 
Sent: Monday, August 19, 2019 at 5:45 PM
From: "Michael DeBellis" <[hidden email]>
To: "User support for WebProtege and Protege Desktop" <[hidden email]>
Subject: Re: [protege-user] Putting Data property restriction in Protege.
.A common way to do what I think you want to do is to have an enumerated class. I.e., define a class called TypeOfDance, create the appropriate instances of TypeOfDance (Individual, Group) and in the Equivalent To field for TypeOfDance put the set {Individual, Group}. Then for performanceType you can make the range be TypeOfDance or you can put any numeric restriction you want on it (e.g. min 1, max 2).  If you look at the tutorial for building the Pizza ontology I think they have an example of defining and using an enumerated class. I think the way you were doing it with a string would work but as Lorenz said other things being equal making them objects rather than strings gives you more capability to do reasoning.
 
Michael
 
 
 
On Sat, Aug 17, 2019 at 11:32 PM Deepjyoti <[hidden email]> wrote:
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png>
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png> I am
working on an ontology.

Dances have performance type like Group  or Individual.

For this assumption there is a class "Dance" and a Data property
"performanceType".

Now here in the performanceType data property I wish to restrict the data
values to "Group" or "Individual" -any one of these two for a particular
Dance.

What would be the best approach to do this in Protege.

Currently I have put a data range restriction as shown in the image attached
herewith.



--
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

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

Re: Putting Data property restriction in Protege.

Michael DeBellis-2
Igor, Excellent point. I was trying to stay as close to the OP's original model as I could but I agree with you, if I were doing it I would model them as classes as well. 

Michael

On Tue, Aug 20, 2019 at 2:55 PM Igor Toujilov <[hidden email]> wrote:

Here is even a more generic approach, which might help you in the future to extend the ontology without refactoring numerous already existing things (even if now you cannot see how the ontology will evolve).

The general principle here is: if the things are likely to be extended in the future, use classes instead of individuals. It is because you can subclass or superclass the classes, not individuals.

So, introduce classes group_performance and individual_performance with superclass "performance". You even might want making "dance" a subclass of "performance". In this case it may be you even do not need a property (just assert group_performance and/or individual_performance for a dance individual). However you can use the similar approach with the object property as well.


Cheers,
Igor

 

 
 
Sent: Monday, August 19, 2019 at 5:45 PM
From: "Michael DeBellis" <[hidden email]>
To: "User support for WebProtege and Protege Desktop" <[hidden email]>
Subject: Re: [protege-user] Putting Data property restriction in Protege.
.A common way to do what I think you want to do is to have an enumerated class. I.e., define a class called TypeOfDance, create the appropriate instances of TypeOfDance (Individual, Group) and in the Equivalent To field for TypeOfDance put the set {Individual, Group}. Then for performanceType you can make the range be TypeOfDance or you can put any numeric restriction you want on it (e.g. min 1, max 2).  If you look at the tutorial for building the Pizza ontology I think they have an example of defining and using an enumerated class. I think the way you were doing it with a string would work but as Lorenz said other things being equal making them objects rather than strings gives you more capability to do reasoning.
 
Michael
 
 
 
On Sat, Aug 17, 2019 at 11:32 PM Deepjyoti <[hidden email]> wrote:
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png>
<http://protege-project.136.n4.nabble.com/file/t377000/protege.png> I am
working on an ontology.

Dances have performance type like Group  or Individual.

For this assumption there is a class "Dance" and a Data property
"performanceType".

Now here in the performanceType data property I wish to restrict the data
values to "Group" or "Individual" -any one of these two for a particular
Dance.

What would be the best approach to do this in Protege.

Currently I have put a data range restriction as shown in the image attached
herewith.



--
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
_______________________________________________
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: Putting Data property restriction in Protege.

Deepjyoti
In reply to this post by Michael DeBellis-2
Hi Michael, you suggestion might help my cause, will proceed that way and
will post the result here. Thanks a lot.



--
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