Ways to create Object property

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

Ways to create Object property

fredjiang
Hi, I am wondering in protege 5.0.0 do I have to create each individual Object property manually by clicking the icons?

Is there an fast way to create a list of Object porperty?

Cheers
Reply | Threaded
Open this post in threaded view
|

Re: Ways to create Object property

Rafael Gonçalves
Hi,

One way to add multiple object properties is using the Cellfie plugin, which allows you to generate axioms from an Excel spreadsheet. Have a look here: https://github.com/protegeproject/cellfie-plugin

Alternatively, if you’re comfortable with Java and the OWL API (http://owlapi.sourceforge.net/), you could programmatically add the object property declarations to your ontology.

Hope this helps.

Cheers,
Rafael

On Aug 31, 2016, at 06:57, fredjiang <[hidden email]> wrote:

Hi, I am wondering in protege 5.0.0 do I have to create each individual
Object property manually by clicking the icons?

Is there an fast way to create a list of Object porperty?

Cheers



--
View this message in context: http://protege-project.136.n4.nabble.com/Ways-to-create-Object-property-tp4666308.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
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: Ways to create Object property

samsontu
Hi,

Unfortunately Cellfie doesn’t allow you to create properties right now. 

I have a hack that may speed up the creation process little. Write in a text file a dummy SWRL rule that uses all of the properties you want to create. Copy and paste the rule into the ROWLTab (from the ROWL Protege 5.0+ Plugin), then right click on the undefined binary predicates to create them. Using this (admittedly inelegant) hack may be less painful than creating a large number of object properties one by one through the Protege UI.

With best regards,
Samson


On Aug 31, 2016, at 9:47 AM, Rafael Gonçalves <[hidden email]> wrote:

Hi,

One way to add multiple object properties is using the Cellfie plugin, which allows you to generate axioms from an Excel spreadsheet. Have a look here: https://github.com/protegeproject/cellfie-plugin

Alternatively, if you’re comfortable with Java and the OWL API (http://owlapi.sourceforge.net/), you could programmatically add the object property declarations to your ontology.

Hope this helps.

Cheers,
Rafael

On Aug 31, 2016, at 06:57, fredjiang <[hidden email]> wrote:

Hi, I am wondering in protege 5.0.0 do I have to create each individual
Object property manually by clicking the icons?

Is there an fast way to create a list of Object porperty?

Cheers



--
View this message in context: http://protege-project.136.n4.nabble.com/Ways-to-create-Object-property-tp4666308.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
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

-- 
Samson Tu                                                      email: [hidden email]
Senior Research Engineer                              web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University                                          fax: 1-650-725-7944




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

Re: Ways to create Object property

Csongor Nyulas
Administrator
Hi Jiang,

I see that both Rafael and Samson assumes that you want to create object properties in your ontology (i.e. to declare new object properties), which, after re-reading your message, seems to be what you want. I have to admit, however, that at first read I thought that you want to add multiple object property assertions (such as "ind1 hasSomeProperty ind2") to your ontology. Just to avoid any miscommunication, could you please clarify which of these two interpretation did you have in mind?

My response below will be based on Rafael's and Samson's interpretation of your question.

Samson is right that Cellfie does not support the Object property declarations yet, as it is mentioned here [1]. However, we have received requests for this feature before, and we have created an issue for this [2], which you can follow, if interested. This feature will not be included in the upcoming release, though. Maybe in the one after that.

In the meantime, if we are talking about hacks, you can also try to use Cellfie's feature to create object properties as a "side effect" of creating object property assertions or class restrictions. For example, you could try this:
1. Create a spreadsheet in which you enumerate in column A all the properties that you want to create
2. Open your ontology and create a class called "Dummy"
3. Start Cellfie, load the spreadsheet, and create the following rule that applies to column range (A,A) and rows (1,+):
  Class: Dummy
    SubClassOf: @A*(ObjectProperty) some owl:Thing
4. Execute the rule and add the axioms to your current ontology, then close Cellfie (saving the rules is not important).
5. Save the ontology; Close and reopen Protege; Load your ontology
6. Delete the "Dummy" class, and save your ontology.

Note: Step 5 is important, because if you skip it, when you delete the "Dummy" class in step 6, all existing references to the object properties will be deleted with it.

BTW, I have created an issue to add functionality to Protege that would allow the creation of property hierarchies: https://github.com/protegeproject/protege/issues/524

Csongor

[1] https://github.com/protegeproject/mapping-master/wiki/MappingMasterDSL#Manchester_Syntax_Coverage
[2] https://github.com/protegeproject/mapping-master/issues/9


On 08/31/2016 01:09 PM, Samson Tu wrote:
Hi,

Unfortunately Cellfie doesn’t allow you to create properties right now. 

I have a hack that may speed up the creation process little. Write in a text file a dummy SWRL rule that uses all of the properties you want to create. Copy and paste the rule into the ROWLTab (from the ROWL Protege 5.0+ Plugin), then right click on the undefined binary predicates to create them. Using this (admittedly inelegant) hack may be less painful than creating a large number of object properties one by one through the Protege UI.

With best regards,
Samson


On Aug 31, 2016, at 9:47 AM, Rafael Gonçalves <[hidden email]> wrote:

Hi,

One way to add multiple object properties is using the Cellfie plugin, which allows you to generate axioms from an Excel spreadsheet. Have a look here: https://github.com/protegeproject/cellfie-plugin

Alternatively, if you’re comfortable with Java and the OWL API (http://owlapi.sourceforge.net/), you could programmatically add the object property declarations to your ontology.

Hope this helps.

Cheers,
Rafael

On Aug 31, 2016, at 06:57, fredjiang <[hidden email]> wrote:

Hi, I am wondering in protege 5.0.0 do I have to create each individual
Object property manually by clicking the icons?

Is there an fast way to create a list of Object porperty?

Cheers



--
View this message in context: http://protege-project.136.n4.nabble.com/Ways-to-create-Object-property-tp4666308.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
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

-- 
Samson Tu                                                      email: [hidden email]
Senior Research Engineer                              web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University                                          fax: 1-650-725-7944





_______________________________________________
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: Ways to create Object property

fredjiang
Hi Csongor

Sorry I didnt make my question clear. I am new to the software and I met tones of questions.

My actual question is exactly what Rafael and Samson talked about. I was trying to declare new object properties and I have about one hundreds of them so it will take me some time to create them manually.

Thank you so much for the tips regarding hacks. i will give it a go to see if I can do that.

Cheers
Reply | Threaded
Open this post in threaded view
|

Re: Ways to create Object property

fredjiang
In reply to this post by samsontu
Hi,

Yes I read it on the cellfie guideline which says it does not support object property import yet.

I will give it a go on the hacks.

Cheers