Data property

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

Data property

Foziah Gazzawe
Hello,

I have a question regarding using ontology. In my project, I need to add a “project size” value (small, medium, and large), I am not sure which data type property to use as I tried most of them and it didn’t work. I then need to link this to the possible risk to the system, the HasRiskContentValue value int. How do I add the measures of the project and link the properties to the risk properties?

Thanks so much in advance.



Sent from my iPhone

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

Re: Data property

Michael DeBellis-2
Foziah, I'm not sure what didn't work for you regarding the datatypes. There are several ways to do what you want. You could make projectSize a datatype and give it a range of xsd:string and then just use the string values "small", "medium", etc. You could also make it an object property with the range being a new enumerated class called SizeOfProject (see the Pizza tutorial for examples of enumerated classes if you aren't already familiar with them) and the enumerated values for SizeOfProject objects such as SmallProject, MediumProject, etc. Personally, I tend to prefer the enumerated type solution but either is good. 

Regarding how to link the two properties IMO the easiest way is a SWRL rule. If you use SWRL remember to use the Pellet reasoner because it supports SWRL best right now. So assuming you take the enumerated type solution I proposed above you could have SWRL rules such as: 

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)
projectSize(?x, LargeProject) -> hasRiskContentValue(?x, 3)

Note: SWRL will only work if you can capture all the hasRiskContentValue parameters in a single rule because it's monotonic (I.e., doesn't support things like incrementing numbers via different rules). 

So a rule like this would work (I'm assuming a higher number means more risk and there is another enumerated type for how experienced the team is):

projectSize(?x, MediumProject) ^ projectExperience(?x, LowExperience) -> hasRiskContentValue(?x, 3)

but two rules like this would NOT work:

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)

projectExperience(?x, LowExperience) ^  hasRiskContentValue(?x, ?y) ^ swrlb:add(?y, 1) -> hasRiskContentValue(?x, ?y)

If you aren't familiar with why SWRL can't support non-monotonic reasoning see Martin's presentation: https://protege.stanford.edu/conference/2009/slides/SWRL2009ProtegeConference.pdf

Also, for a quick and dirty SWRL tutorial see my blog page:  https://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html

Michael

On Sat, Nov 24, 2018 at 10:18 AM Foziah Gazzawe <[hidden email]> wrote:
Hello,

I have a question regarding using ontology. In my project, I need to add a “project size” value (small, medium, and large), I am not sure which data type property to use as I tried most of them and it didn’t work. I then need to link this to the possible risk to the system, the HasRiskContentValue value int. How do I add the measures of the project and link the properties to the risk properties?

Thanks so much in advance.



Sent from my iPhone
_______________________________________________
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: Data property

Foziah Gazzawe
Hi Michael, 

Thank you for the explanation.  


I just want to ask about something as I do not want to use SWRL because all calculations will be on frontend code not on the ontology. 

In my project, I have a class called RequirementArtefact and there are subclasses and I have the following modifiers (Project size and stakeholder Skill) which have the same values as I explained before. 

is it possible to creates 2 different types of data properties as the first one is projectSize ("small", "medium", and "large") and the other one is hasSkill ("low", "medium", and "high"). 

Then I create another data property called hasRiskContentValue after that go to each RequirementArtefact and write as the attachment pic? 


Regards,
 



From: Michael DeBellis>
Date: 24 November 2018 at 7:23:19 pm GMT
To: User support for WebProtege and Protege Desktop <[hidden email]>
Subject: Re: [protege-user] Data property
Reply-To: User support for WebProtege and Protege Desktop <[hidden email]>

Foziah, I'm not sure what didn't work for you regarding the datatypes. There are several ways to do what you want. You could make projectSize a datatype and give it a range of xsd:string and then just use the string values "small", "medium", etc. You could also make it an object property with the range being a new enumerated class called SizeOfProject (see the Pizza tutorial for examples of enumerated classes if you aren't already familiar with them) and the enumerated values for SizeOfProject objects such as SmallProject, MediumProject, etc. Personally, I tend to prefer the enumerated type solution but either is good. 

Regarding how to link the two properties IMO the easiest way is a SWRL rule. If you use SWRL remember to use the Pellet reasoner because it supports SWRL best right now. So assuming you take the enumerated type solution I proposed above you could have SWRL rules such as: 

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)
projectSize(?x, LargeProject) -> hasRiskContentValue(?x, 3)

Note: SWRL will only work if you can capture all the hasRiskContentValue parameters in a single rule because it's monotonic (I.e., doesn't support things like incrementing numbers via different rules). 

So a rule like this would work (I'm assuming a higher number means more risk and there is another enumerated type for how experienced the team is):

projectSize(?x, MediumProject) ^ projectExperience(?x, LowExperience) -> hasRiskContentValue(?x, 3)

but two rules like this would NOT work:

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)

projectExperience(?x, LowExperience) ^  hasRiskContentValue(?x, ?y) ^ swrlb:add(?y, 1) -> hasRiskContentValue(?x, ?y)

If you aren't familiar with why SWRL can't support non-monotonic reasoning see Martin's presentation: https://protege.stanford.edu/conference/2009/slides/SWRL2009ProtegeConference.pdf

Also, for a quick and dirty SWRL tutorial see my blog page:  https://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html

Michael

On Sat, Nov 24, 2018 at 10:18 AM Foziah Gazzawe <[hidden email]> wrote:
Hello,

I have a question regarding using ontology. In my project, I need to add a “project size” value (small, medium, and large), I am not sure which data type property to use as I tried most of them and it didn’t work. I then need to link this to the possible risk to the system, the HasRiskContentValue value int. How do I add the measures of the project and link the properties to the risk properties?

Thanks so much in advance.



Sent from my iPhone
_______________________________________________
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

Screenshot 2018-11-26 at 15.36.25.png (415K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Data property

sanju tiwari
Dear Finish
You can make  data properties as you required for your project.

On Mon, 26 Nov 2018, 21:51 Foziah Gazzawe, <[hidden email]> wrote:
Hi Michael, 

Thank you for the explanation.  


I just want to ask about something as I do not want to use SWRL because all calculations will be on frontend code not on the ontology. 

In my project, I have a class called RequirementArtefact and there are subclasses and I have the following modifiers (Project size and stakeholder Skill) which have the same values as I explained before. 

is it possible to creates 2 different types of data properties as the first one is projectSize ("small", "medium", and "large") and the other one is hasSkill ("low", "medium", and "high"). 

Then I create another data property called hasRiskContentValue after that go to each RequirementArtefact and write as the attachment pic? 


Regards,
 



From: Michael DeBellis>
Date: 24 November 2018 at 7:23:19 pm GMT
To: User support for WebProtege and Protege Desktop <[hidden email]>
Subject: Re: [protege-user] Data property
Reply-To: User support for WebProtege and Protege Desktop <[hidden email]>

Foziah, I'm not sure what didn't work for you regarding the datatypes. There are several ways to do what you want. You could make projectSize a datatype and give it a range of xsd:string and then just use the string values "small", "medium", etc. You could also make it an object property with the range being a new enumerated class called SizeOfProject (see the Pizza tutorial for examples of enumerated classes if you aren't already familiar with them) and the enumerated values for SizeOfProject objects such as SmallProject, MediumProject, etc. Personally, I tend to prefer the enumerated type solution but either is good. 

Regarding how to link the two properties IMO the easiest way is a SWRL rule. If you use SWRL remember to use the Pellet reasoner because it supports SWRL best right now. So assuming you take the enumerated type solution I proposed above you could have SWRL rules such as: 

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)
projectSize(?x, LargeProject) -> hasRiskContentValue(?x, 3)

Note: SWRL will only work if you can capture all the hasRiskContentValue parameters in a single rule because it's monotonic (I.e., doesn't support things like incrementing numbers via different rules). 

So a rule like this would work (I'm assuming a higher number means more risk and there is another enumerated type for how experienced the team is):

projectSize(?x, MediumProject) ^ projectExperience(?x, LowExperience) -> hasRiskContentValue(?x, 3)

but two rules like this would NOT work:

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)

projectExperience(?x, LowExperience) ^  hasRiskContentValue(?x, ?y) ^ swrlb:add(?y, 1) -> hasRiskContentValue(?x, ?y)

If you aren't familiar with why SWRL can't support non-monotonic reasoning see Martin's presentation: https://protege.stanford.edu/conference/2009/slides/SWRL2009ProtegeConference.pdf

Also, for a quick and dirty SWRL tutorial see my blog page:  https://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html

Michael

On Sat, Nov 24, 2018 at 10:18 AM Foziah Gazzawe <[hidden email]> wrote:
Hello,

I have a question regarding using ontology. In my project, I need to add a “project size” value (small, medium, and large), I am not sure which data type property to use as I tried most of them and it didn’t work. I then need to link this to the possible risk to the system, the HasRiskContentValue value int. How do I add the measures of the project and link the properties to the risk properties?

Thanks so much in advance.



Sent from my iPhone
_______________________________________________
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: Data property

sanju tiwari
Sorry for typos mistake Foziah

On Mon, 26 Nov 2018, 22:04 Sanju Tiwari, <[hidden email]> wrote:
Dear Finish
You can make  data properties as you required for your project.

On Mon, 26 Nov 2018, 21:51 Foziah Gazzawe, <[hidden email]> wrote:
Hi Michael, 

Thank you for the explanation.  


I just want to ask about something as I do not want to use SWRL because all calculations will be on frontend code not on the ontology. 

In my project, I have a class called RequirementArtefact and there are subclasses and I have the following modifiers (Project size and stakeholder Skill) which have the same values as I explained before. 

is it possible to creates 2 different types of data properties as the first one is projectSize ("small", "medium", and "large") and the other one is hasSkill ("low", "medium", and "high"). 

Then I create another data property called hasRiskContentValue after that go to each RequirementArtefact and write as the attachment pic? 


Regards,
 



From: Michael DeBellis>
Date: 24 November 2018 at 7:23:19 pm GMT
To: User support for WebProtege and Protege Desktop <[hidden email]>
Subject: Re: [protege-user] Data property
Reply-To: User support for WebProtege and Protege Desktop <[hidden email]>

Foziah, I'm not sure what didn't work for you regarding the datatypes. There are several ways to do what you want. You could make projectSize a datatype and give it a range of xsd:string and then just use the string values "small", "medium", etc. You could also make it an object property with the range being a new enumerated class called SizeOfProject (see the Pizza tutorial for examples of enumerated classes if you aren't already familiar with them) and the enumerated values for SizeOfProject objects such as SmallProject, MediumProject, etc. Personally, I tend to prefer the enumerated type solution but either is good. 

Regarding how to link the two properties IMO the easiest way is a SWRL rule. If you use SWRL remember to use the Pellet reasoner because it supports SWRL best right now. So assuming you take the enumerated type solution I proposed above you could have SWRL rules such as: 

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)
projectSize(?x, LargeProject) -> hasRiskContentValue(?x, 3)

Note: SWRL will only work if you can capture all the hasRiskContentValue parameters in a single rule because it's monotonic (I.e., doesn't support things like incrementing numbers via different rules). 

So a rule like this would work (I'm assuming a higher number means more risk and there is another enumerated type for how experienced the team is):

projectSize(?x, MediumProject) ^ projectExperience(?x, LowExperience) -> hasRiskContentValue(?x, 3)

but two rules like this would NOT work:

projectSize(?x, MediumProject) -> hasRiskContentValue(?x, 2)

projectExperience(?x, LowExperience) ^  hasRiskContentValue(?x, ?y) ^ swrlb:add(?y, 1) -> hasRiskContentValue(?x, ?y)

If you aren't familiar with why SWRL can't support non-monotonic reasoning see Martin's presentation: https://protege.stanford.edu/conference/2009/slides/SWRL2009ProtegeConference.pdf

Also, for a quick and dirty SWRL tutorial see my blog page:  https://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html

Michael

On Sat, Nov 24, 2018 at 10:18 AM Foziah Gazzawe <[hidden email]> wrote:
Hello,

I have a question regarding using ontology. In my project, I need to add a “project size” value (small, medium, and large), I am not sure which data type property to use as I tried most of them and it didn’t work. I then need to link this to the possible risk to the system, the HasRiskContentValue value int. How do I add the measures of the project and link the properties to the risk properties?

Thanks so much in advance.



Sent from my iPhone
_______________________________________________
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