Adding a language to all rdfs labels of an ontology in bulk

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

Adding a language to all rdfs labels of an ontology in bulk

Clarissa Feio
Hello,

As I am building a multilingual ontology, I need to give an indication of the languages of each rdfs label. 

I do import external ontologies, that have thousands of classes without saying in which language each rdfs label is. 

At the moment all the labels that are currently in the ontology are in English, but this is about to change. Is there a way of adding the english language ('en') to all the labels in an ontology bulk? Or do I have to add the 'en' to each rdfs label one by one?

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: Adding a language to all rdfs labels of an ontology in bulk

Karl Helmer
Hi Clarissa,

   This is a fairly simple thing to do in python using regular expressions.  Is that
a possibility for you?  I don't know if it's possible in protege itself.

regards,
Karl


>         External Email - Use Caution
>
> Hello,
>
> As I am building a multilingual ontology, I need to give an indication of
> the languages of each rdfs label.
>
> I do import external ontologies, that have thousands of classes without
> saying in which language each rdfs label is.
>
> At the moment all the labels that are currently in the ontology are in
> English, but this is about to change. Is there a way of adding the english
> language ('en') to all the labels in an ontology bulk? Or do I have to add
> the 'en' to each rdfs label one by one?
>
> 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
>


--
Karl Helmer, PhD
Athinoula A Martinos Center for Biomedical Imaging
Massachusetts General Hospital
149 - 13th St Room 2301
Charlestown, MA 02129
(p) 617.726.8636
(f) 617.726.7422
[hidden email]
http://www.martinos.org/user/6787


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

Re: Adding a language to all rdfs labels of an ontology in bulk

Ghislain ATEMEZING
Hi Clarissa,
you can use the Cellfie  plugin[1]. 
Say you have something like this in an Excel file

Terms Eng FR ES
Drug Drug Medicament Medicamento
House House Maison Casa
Aterm A term Un terme Un termino

You can use Cellfie to insert rdfs:label to your ontology, assuming column "Terms" are the terms existing in your ontology.
A simple rule can be this one, based on the above sample. 

Class: @A*
Annotations: rdfs:label @B*(xml:lang="en"),
rdfs:label @C*(xml:lang="fr"),
rdfs:label @D*(xml:lang="es")


Find attached some screenshots of the proposed solution.

HTH
Best,
Ghislain


On Fri, Feb 7, 2020 at 5:58 PM Karl Helmer <[hidden email]> wrote:
Hi Clarissa,

   This is a fairly simple thing to do in python using regular expressions.  Is that
a possibility for you?  I don't know if it's possible in protege itself.

regards,
Karl


>         External Email - Use Caution
>
> Hello,
>
> As I am building a multilingual ontology, I need to give an indication of
> the languages of each rdfs label.
>
> I do import external ontologies, that have thousands of classes without
> saying in which language each rdfs label is.
>
> At the moment all the labels that are currently in the ontology are in
> English, but this is about to change. Is there a way of adding the english
> language ('en') to all the labels in an ontology bulk? Or do I have to add
> the 'en' to each rdfs label one by one?
>
> 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
>


--
Karl Helmer, PhD
Athinoula A Martinos Center for Biomedical Imaging
Massachusetts General Hospital
149 - 13th St Room 2301
Charlestown, MA 02129
(p) 617.726.8636
(f) 617.726.7422
[hidden email]
http://www.martinos.org/user/6787


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


--

"Love all, trust a few, do wrong to none" (W. Shakespeare)


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

=?UTF-8?B?Q2FwdHVyZSBkJ2XMgWNyYW4gMjAyMC0wMi0wNyAxOC4xNy4zNy5wbmc=?= (122K) Download Attachment
=?UTF-8?B?Q2FwdHVyZSBkJ2XMgWNyYW4gMjAyMC0wMi0wNyAxOC4xNi4zMC5wbmc=?= (260K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Adding a language to all rdfs labels of an ontology in bulk

Clarissa Feio
In reply to this post by Karl Helmer
Thank you for helping!

On Fri, Feb 7, 2020 at 4:58 PM Karl Helmer <[hidden email]> wrote:
Hi Clarissa,

   This is a fairly simple thing to do in python using regular expressions.  Is that
a possibility for you?  I don't know if it's possible in protege itself.

regards,
Karl


>         External Email - Use Caution
>
> Hello,
>
> As I am building a multilingual ontology, I need to give an indication of
> the languages of each rdfs label.
>
> I do import external ontologies, that have thousands of classes without
> saying in which language each rdfs label is.
>
> At the moment all the labels that are currently in the ontology are in
> English, but this is about to change. Is there a way of adding the english
> language ('en') to all the labels in an ontology bulk? Or do I have to add
> the 'en' to each rdfs label one by one?
>
> 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
>


--
Karl Helmer, PhD
Athinoula A Martinos Center for Biomedical Imaging
Massachusetts General Hospital
149 - 13th St Room 2301
Charlestown, MA 02129
(p) 617.726.8636
(f) 617.726.7422
[hidden email]
http://www.martinos.org/user/6787


_______________________________________________
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