webprotege and annotations for annotation assertion

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

webprotege and annotations for annotation assertion

Clarissa Feio
Hello,

I have been using Protege desktop until now, and at the moment I am experimenting with web protege. 

In protege desktop, if you click on the @ symbol next to an annotation property, you can add an annotation assertion. 

However, this doesn't seem to be available for webprotege. Is this correct?

Kind regards,
Clarissa. 

--



Hello. This email is only for the person it’s addressed to. However, if this email wasn’t addressed to you and you are reading it, then this notice is for you, so please read on. Please delete this email, including its contents and attachments from all of your devices and cloud services and let the sender know. Also, you may not use, rely on or benefit from the information contained in this email in any way and must treat it confidentially. Thank you.

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

Re: webprotege and annotations for annotation assertion

Michael DeBellis-2
Clarissa, you can enter annotations in Web Protege. Click on the class, property, or individual, you should see to the right a window with various information about the object you clicked on such as it's IRI, it's Parent classes (if it's a class), etc. The info will of course depend on what kind of object you click on but in all cases you should see a field (I think it's always under the IRI) where you can enter annotations. Enter the name of the annotation in the left field. As you start to type you should see a menu with all the defined annotations in that ontology. Type or select from the menu the annotation you want then in the right field, enter the value. I've created a screen shot example below.  Note that the field names are prefaced by the namespace that the annotation belongs in. Since, I started typing d in the example below I'm seeing all the annotations in the dc namespace.

Cheers,
Michael

WebProtegeAnnotations.PNG

On Fri, Dec 6, 2019 at 6:28 AM Clarissa Feio <[hidden email]> wrote:
Hello,

I have been using Protege desktop until now, and at the moment I am experimenting with web protege. 

In protege desktop, if you click on the @ symbol next to an annotation property, you can add an annotation assertion. 

However, this doesn't seem to be available for webprotege. Is this correct?

Kind regards,
Clarissa. 

--



Hello. This email is only for the person it’s addressed to. However, if this email wasn’t addressed to you and you are reading it, then this notice is for you, so please read on. Please delete this email, including its contents and attachments from all of your devices and cloud services and let the sender know. Also, you may not use, rely on or benefit from the information contained in this email in any way and must treat it confidentially. Thank you.
_______________________________________________
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: webprotege and annotations for annotation assertion

Clarissa Feio
Dear Michael,

In the attached  desktop protege screenshot from the environmental ontology
you can see that they added an annotation to an annotation (a database cross
reference to the definition).

Being able to do this is quite important to me, as I am going to have
definitions to classes that belong to several jurisdiction, and I need to be
able to attach each definition to the jurisdiction it belongs to.

Is this something we can do with webprotege?

Thank you so much for your help

Kind regards,
Clarissa.

<http://protege-project.136.n4.nabble.com/file/t377153/Screenshot_2020-01-06_at_11.png>




--
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: webprotege and annotations for annotation assertion

Michael DeBellis-2
Clarissa, Are you sure annotations on annotations are really that important? An annotation is something that the reasoner just ignores so I usually keep it as a last resort or for obvious things such as comments where it is the right thing to do. E.g., is it possible to create a class called a Juristiction and then associate instances of that class with the various other classes? You can do that by using punning for the other classes, that's a common technique when you want to associate some property value with a whole class rather than an instance:  https://www.w3.org/TR/owl2-new-features/#F12:_Punning  

But if you do need to do annotations on annotations have you tried just loading that OWL file into Web Protege? I tried creating a new annotation on an existing comment annotation in Web Protege and couldn't see how to do it but I have an appointment this morning so I don't have time to really look into it in detail. I'll look at it more carefully when I'm back later today or perhaps someone else on the list who has more experience with Web Protege than I do (I work in the Desktop version most of the time) will have some ideas. 

Cheers,
Michael

On Mon, Jan 6, 2020 at 3:35 AM Clarissa Feio <[hidden email]> wrote:
Dear Michael,

In the attached  desktop protege screenshot from the environmental ontology
you can see that they added an annotation to an annotation (a database cross
reference to the definition).

Being able to do this is quite important to me, as I am going to have
definitions to classes that belong to several jurisdiction, and I need to be
able to attach each definition to the jurisdiction it belongs to.

Is this something we can do with webprotege?

Thank you so much for your help

Kind regards,
Clarissa.

<http://protege-project.136.n4.nabble.com/file/t377153/Screenshot_2020-01-06_at_11.png>




--
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: webprotege and annotations for annotation assertion

Michael DeBellis-2
In reply to this post by Clarissa Feio
Clarissa, I'm back and I tried to see if I could make this work. To the best of my knowledge Web Protege doesn't currently support this. I tried creating an example in Desktop Protege. In the desktop version you can select an annotation just like any other object. I loaded a small test ontology and created a comment on the Person class. Then I selected that comment and chose the edit icon. One of the tabs is called Property values. I selected that and added an annotation to the annotation (a comment called meta comment see screen snapshot below).  Then I loaded the modified ontology into Web Protege. Unfortunately, when I selected the Person class that had an annotation on an annotation (which under normal circumstances would have allowed me to see the annotations on Person) I got a generic error message, something like "An Error occurred, please try again.  Unsupported." I take this to mean that annotations on annotations aren't currently supported in Web Protege (not much of a surprise, it's not something people use often, I've never seen it used). I think you can still have them in an ontology in Web Protege. The ontology seemed to load fine and everything else still works. It's just that you can't create, view, or edit annotations on annotations in Web Protege at the current time. . 

Here is an alternative way that I think might work: Make a class (or classes) to represent the information you were saving as annotations. Then define an object property to associate the individuals with a class (using Punning) and then another data property to associate the meta information as values of the individuals. E.g., create a class called Definition and then an object property hasDefinition. For each class create a punned individual and assign it's hasDefinition property to the appropriate instance of the Definition class. Then create another data property (assuming you still want to represent this info as a string) called hasDBCrossReference and assign the appropriate string to each instance of Definition. The instances of Definition are the original annotations and the strings that are the value of the  hasDBCrossReference are what were being represented as annotations on annotations. 

Either that or if you can live with only being able to view the annotations on annotations in the desktop version stick with that.

Cheers,
Michael

MetaAnnotation.PNG

On Mon, Jan 6, 2020 at 3:35 AM Clarissa Feio <[hidden email]> wrote:
Dear Michael,

In the attached  desktop protege screenshot from the environmental ontology
you can see that they added an annotation to an annotation (a database cross
reference to the definition).

Being able to do this is quite important to me, as I am going to have
definitions to classes that belong to several jurisdiction, and I need to be
able to attach each definition to the jurisdiction it belongs to.

Is this something we can do with webprotege?

Thank you so much for your help

Kind regards,
Clarissa.

<http://protege-project.136.n4.nabble.com/file/t377153/Screenshot_2020-01-06_at_11.png>




--
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: webprotege and annotations for annotation assertion

Clarissa Feio
Dear Michael,

I will try and do as you suggest and see how it works. 

Thank you so much for your kind help.

Kind regards,
Clarissa. 

On Mon, Jan 6, 2020 at 6:42 PM Michael DeBellis <[hidden email]> wrote:
Clarissa, I'm back and I tried to see if I could make this work. To the best of my knowledge Web Protege doesn't currently support this. I tried creating an example in Desktop Protege. In the desktop version you can select an annotation just like any other object. I loaded a small test ontology and created a comment on the Person class. Then I selected that comment and chose the edit icon. One of the tabs is called Property values. I selected that and added an annotation to the annotation (a comment called meta comment see screen snapshot below).  Then I loaded the modified ontology into Web Protege. Unfortunately, when I selected the Person class that had an annotation on an annotation (which under normal circumstances would have allowed me to see the annotations on Person) I got a generic error message, something like "An Error occurred, please try again.  Unsupported." I take this to mean that annotations on annotations aren't currently supported in Web Protege (not much of a surprise, it's not something people use often, I've never seen it used). I think you can still have them in an ontology in Web Protege. The ontology seemed to load fine and everything else still works. It's just that you can't create, view, or edit annotations on annotations in Web Protege at the current time. . 

Here is an alternative way that I think might work: Make a class (or classes) to represent the information you were saving as annotations. Then define an object property to associate the individuals with a class (using Punning) and then another data property to associate the meta information as values of the individuals. E.g., create a class called Definition and then an object property hasDefinition. For each class create a punned individual and assign it's hasDefinition property to the appropriate instance of the Definition class. Then create another data property (assuming you still want to represent this info as a string) called hasDBCrossReference and assign the appropriate string to each instance of Definition. The instances of Definition are the original annotations and the strings that are the value of the  hasDBCrossReference are what were being represented as annotations on annotations. 

Either that or if you can live with only being able to view the annotations on annotations in the desktop version stick with that.

Cheers,
Michael

MetaAnnotation.PNG

On Mon, Jan 6, 2020 at 3:35 AM Clarissa Feio <[hidden email]> wrote:
Dear Michael,

In the attached  desktop protege screenshot from the environmental ontology
you can see that they added an annotation to an annotation (a database cross
reference to the definition).

Being able to do this is quite important to me, as I am going to have
definitions to classes that belong to several jurisdiction, and I need to be
able to attach each definition to the jurisdiction it belongs to.

Is this something we can do with webprotege?

Thank you so much for your help

Kind regards,
Clarissa.

<http://protege-project.136.n4.nabble.com/file/t377153/Screenshot_2020-01-06_at_11.png>




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


--



Hello. This email is only for the person it’s addressed to. However, if this email wasn’t addressed to you and you are reading it, then this notice is for you, so please read on. Please delete this email, including its contents and attachments from all of your devices and cloud services and let the sender know. Also, you may not use, rely on or benefit from the information contained in this email in any way and must treat it confidentially. Thank you.

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

Re: webprotege and annotations for annotation assertion

Michael DeBellis-2
Clarissa, glad to help. I actually had one other idea this morning. It occurs to me that one issue with the design I sketched out yesterday is that it works for classes but not for properties. Perhaps this isn't an issue but if you are linking to a database it occurred to me that you may wish to have similar links to properties (relations in an RDB) as to classes (entities in an RDB). So here is an alternative way that will work for both classes and properties because it doesn't require punning. You can make the value of an annotation be an object which of course can have properties. That is a way to represent your annotations on annotations in a way that you can still see the info in Web Protege. I created a new annotation called hasDefinition. Then I created a class called Definition with two string data properties: hasDefinitionString and hasDBCrossReference. I then created an instance of the Definition class called Definition1 and added a hasDefinition annotation to the object property (it would of course work for classes as well) hasCar and I made the hasDefinitionString and hasDBCrossReference for Definition1 the same strings as the two annotation strings in your example. I'm attaching the example ontology (it's a simple Car ontology, you can ignore most of it but just so you can see an example of how I did it). 

FYI, if you use this design be aware that when you set the annotation value you need to have the Definition object (or whatever you decide to call it) created already. Then when you set the annotation navigate to the "Entity IRI" tab and from there you will see many sub-tabs, use the Individuals sub-tab and you should see the instances of Definition in that list and you can select the appropriate one. Note: this is all for the Desktop version. I loaded this ontology into Web Protege and I'm able to see the Definition1 object and click on it to see the string values. Here is a link to the property with the annotation that I think should work if you want to see the ontology in Web Protege: https://webprotege.stanford.edu/#projects/0e72b197-ebba-46ec-961b-dd2faf137589/edit/Properties?selection=ObjectProperty(%3Chttp://www.semanticweb.org/michaeldebellis/ontologies/2019/3/untitled-ontology-165%23hasCar%3E)  Of course you need to be logged in before you can see it. 

Unfortunately, I don't think you can enter this info via Web Protege. I tried to do that but it seems to me that in Web Protege you can only add string annotations. I tried adding Definition1 as an annotation for a class and while it worked it just had the string Definition1 not the object as in the annotation for the hasCar property. But as I said you can at least view the info in Web Protege but would need to edit it in the Desktop version. 

Actually, that is another advantage of the previous design, is that I think you could do the punned value editing in Web Protege. If you only need to do this for classes then I think I have a slight preference for the previous design because annotations can't be reasoned about with DL or SWRL and I've found SWRL can be very useful for transforming data. But if you do need to also add this info to properties or for other reasons you prefer using annotations this alternative should work as well. Let me know if you have questions.

Cheers,
Michael

On Tue, Jan 7, 2020 at 3:24 AM Clarissa Feio <[hidden email]> wrote:
Dear Michael,

I will try and do as you suggest and see how it works. 

Thank you so much for your kind help.

Kind regards,
Clarissa. 

On Mon, Jan 6, 2020 at 6:42 PM Michael DeBellis <[hidden email]> wrote:
Clarissa, I'm back and I tried to see if I could make this work. To the best of my knowledge Web Protege doesn't currently support this. I tried creating an example in Desktop Protege. In the desktop version you can select an annotation just like any other object. I loaded a small test ontology and created a comment on the Person class. Then I selected that comment and chose the edit icon. One of the tabs is called Property values. I selected that and added an annotation to the annotation (a comment called meta comment see screen snapshot below).  Then I loaded the modified ontology into Web Protege. Unfortunately, when I selected the Person class that had an annotation on an annotation (which under normal circumstances would have allowed me to see the annotations on Person) I got a generic error message, something like "An Error occurred, please try again.  Unsupported." I take this to mean that annotations on annotations aren't currently supported in Web Protege (not much of a surprise, it's not something people use often, I've never seen it used). I think you can still have them in an ontology in Web Protege. The ontology seemed to load fine and everything else still works. It's just that you can't create, view, or edit annotations on annotations in Web Protege at the current time. . 

Here is an alternative way that I think might work: Make a class (or classes) to represent the information you were saving as annotations. Then define an object property to associate the individuals with a class (using Punning) and then another data property to associate the meta information as values of the individuals. E.g., create a class called Definition and then an object property hasDefinition. For each class create a punned individual and assign it's hasDefinition property to the appropriate instance of the Definition class. Then create another data property (assuming you still want to represent this info as a string) called hasDBCrossReference and assign the appropriate string to each instance of Definition. The instances of Definition are the original annotations and the strings that are the value of the  hasDBCrossReference are what were being represented as annotations on annotations. 

Either that or if you can live with only being able to view the annotations on annotations in the desktop version stick with that.

Cheers,
Michael

MetaAnnotation.PNG

On Mon, Jan 6, 2020 at 3:35 AM Clarissa Feio <[hidden email]> wrote:
Dear Michael,

In the attached  desktop protege screenshot from the environmental ontology
you can see that they added an annotation to an annotation (a database cross
reference to the definition).

Being able to do this is quite important to me, as I am going to have
definitions to classes that belong to several jurisdiction, and I need to be
able to attach each definition to the jurisdiction it belongs to.

Is this something we can do with webprotege?

Thank you so much for your help

Kind regards,
Clarissa.

<http://protege-project.136.n4.nabble.com/file/t377153/Screenshot_2020-01-06_at_11.png>




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


--



Hello. This email is only for the person it’s addressed to. However, if this email wasn’t addressed to you and you are reading it, then this notice is for you, so please read on. Please delete this email, including its contents and attachments from all of your devices and cloud services and let the sender know. Also, you may not use, rely on or benefit from the information contained in this email in any way and must treat it confidentially. Thank you.
_______________________________________________
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

CarExample1.owl (66K) Download Attachment