Change order for rdfs:label in Protégé
When creating multi-languages ontology, Protégé puts the first created label (or comment) in first in the .owl exported file.
For example, I have some properties with the English label in first:
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
I want to have the French label as the default one. It is possible to configure Protégé to do this in View->Custom Rendering->fr.
The order of English and French labels is not important in Protégé. However, I want to export my ontology to an Omeka S website. Omeka S will only keep the first label in the owl file. Therefore, I will have an English label for the example above and a French one for the one below:
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
If I modify by hand my .owl file (putting French label lines always before the English ones), this action will be erased each time I modify a property and same the file with Protégé.
Is it a way to the French labels (or comments) always in top?
rdf owl ontology protege
add a comment |
When creating multi-languages ontology, Protégé puts the first created label (or comment) in first in the .owl exported file.
For example, I have some properties with the English label in first:
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
I want to have the French label as the default one. It is possible to configure Protégé to do this in View->Custom Rendering->fr.
The order of English and French labels is not important in Protégé. However, I want to export my ontology to an Omeka S website. Omeka S will only keep the first label in the owl file. Therefore, I will have an English label for the example above and a French one for the one below:
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
If I modify by hand my .owl file (putting French label lines always before the English ones), this action will be erased each time I modify a property and same the file with Protégé.
Is it a way to the French labels (or comments) always in top?
rdf owl ontology protege
1
Protégé puts the first created label (or comment) in first in the .owl exported file -- it seems that Protege orders saved labels alphabetically (by value first, by language second). Hence: 1. Replace all<rdfs:label xml:lang="fr">
with<rdfs:label xml:lang="fr">!
in your text editor. 2. Open your ontology in Protege, edit something, save the ontology. 3. Replace all<rdfs:label xml:lang="fr">!
with<rdfs:label xml:lang="fr">
in the text editor.
– Stanislav Kralin
Nov 12 '18 at 18:22
@StanislavKralin Thanks I was assuming wrongly it was the first created label in top. This is a good workaround but I am interested also if there is a other way (less manual).
– ppr
Nov 13 '18 at 8:45
"less manual" – by "replace", I mean Ctrl+H or something like.
– Stanislav Kralin
Nov 16 '18 at 10:11
add a comment |
When creating multi-languages ontology, Protégé puts the first created label (or comment) in first in the .owl exported file.
For example, I have some properties with the English label in first:
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
I want to have the French label as the default one. It is possible to configure Protégé to do this in View->Custom Rendering->fr.
The order of English and French labels is not important in Protégé. However, I want to export my ontology to an Omeka S website. Omeka S will only keep the first label in the owl file. Therefore, I will have an English label for the example above and a French one for the one below:
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
If I modify by hand my .owl file (putting French label lines always before the English ones), this action will be erased each time I modify a property and same the file with Protégé.
Is it a way to the French labels (or comments) always in top?
rdf owl ontology protege
When creating multi-languages ontology, Protégé puts the first created label (or comment) in first in the .owl exported file.
For example, I have some properties with the English label in first:
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
I want to have the French label as the default one. It is possible to configure Protégé to do this in View->Custom Rendering->fr.
The order of English and French labels is not important in Protégé. However, I want to export my ontology to an Omeka S website. Omeka S will only keep the first label in the owl file. Therefore, I will have an English label for the example above and a French one for the one below:
<rdfs:label xml:lang="fr">citeApparatNom</rdfs:label>
<rdfs:label xml:lang="en">citeApparatName</rdfs:label>
If I modify by hand my .owl file (putting French label lines always before the English ones), this action will be erased each time I modify a property and same the file with Protégé.
Is it a way to the French labels (or comments) always in top?
rdf owl ontology protege
rdf owl ontology protege
asked Nov 12 '18 at 16:31
ppr
352222
352222
1
Protégé puts the first created label (or comment) in first in the .owl exported file -- it seems that Protege orders saved labels alphabetically (by value first, by language second). Hence: 1. Replace all<rdfs:label xml:lang="fr">
with<rdfs:label xml:lang="fr">!
in your text editor. 2. Open your ontology in Protege, edit something, save the ontology. 3. Replace all<rdfs:label xml:lang="fr">!
with<rdfs:label xml:lang="fr">
in the text editor.
– Stanislav Kralin
Nov 12 '18 at 18:22
@StanislavKralin Thanks I was assuming wrongly it was the first created label in top. This is a good workaround but I am interested also if there is a other way (less manual).
– ppr
Nov 13 '18 at 8:45
"less manual" – by "replace", I mean Ctrl+H or something like.
– Stanislav Kralin
Nov 16 '18 at 10:11
add a comment |
1
Protégé puts the first created label (or comment) in first in the .owl exported file -- it seems that Protege orders saved labels alphabetically (by value first, by language second). Hence: 1. Replace all<rdfs:label xml:lang="fr">
with<rdfs:label xml:lang="fr">!
in your text editor. 2. Open your ontology in Protege, edit something, save the ontology. 3. Replace all<rdfs:label xml:lang="fr">!
with<rdfs:label xml:lang="fr">
in the text editor.
– Stanislav Kralin
Nov 12 '18 at 18:22
@StanislavKralin Thanks I was assuming wrongly it was the first created label in top. This is a good workaround but I am interested also if there is a other way (less manual).
– ppr
Nov 13 '18 at 8:45
"less manual" – by "replace", I mean Ctrl+H or something like.
– Stanislav Kralin
Nov 16 '18 at 10:11
1
1
Protégé puts the first created label (or comment) in first in the .owl exported file -- it seems that Protege orders saved labels alphabetically (by value first, by language second). Hence: 1. Replace all
<rdfs:label xml:lang="fr">
with <rdfs:label xml:lang="fr">!
in your text editor. 2. Open your ontology in Protege, edit something, save the ontology. 3. Replace all <rdfs:label xml:lang="fr">!
with <rdfs:label xml:lang="fr">
in the text editor.– Stanislav Kralin
Nov 12 '18 at 18:22
Protégé puts the first created label (or comment) in first in the .owl exported file -- it seems that Protege orders saved labels alphabetically (by value first, by language second). Hence: 1. Replace all
<rdfs:label xml:lang="fr">
with <rdfs:label xml:lang="fr">!
in your text editor. 2. Open your ontology in Protege, edit something, save the ontology. 3. Replace all <rdfs:label xml:lang="fr">!
with <rdfs:label xml:lang="fr">
in the text editor.– Stanislav Kralin
Nov 12 '18 at 18:22
@StanislavKralin Thanks I was assuming wrongly it was the first created label in top. This is a good workaround but I am interested also if there is a other way (less manual).
– ppr
Nov 13 '18 at 8:45
@StanislavKralin Thanks I was assuming wrongly it was the first created label in top. This is a good workaround but I am interested also if there is a other way (less manual).
– ppr
Nov 13 '18 at 8:45
"less manual" – by "replace", I mean Ctrl+H or something like.
– Stanislav Kralin
Nov 16 '18 at 10:11
"less manual" – by "replace", I mean Ctrl+H or something like.
– Stanislav Kralin
Nov 16 '18 at 10:11
add a comment |
1 Answer
1
active
oldest
votes
From what you describe, the task you're trying to accomplish is to prepare the ontologies for export to a slightly different format - one that allows only one label per entity (even if it's still OWL otherwise).
What I'd do is delete all non french labels. Could be done with code parsing the XML itself or with OWLAPI code, so that you have a tool to run against your ontology every time you want to refresh the export you make to Omeka S.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266385%2fchange-order-for-rdfslabel-in-prot%25c3%25a9g%25c3%25a9%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
From what you describe, the task you're trying to accomplish is to prepare the ontologies for export to a slightly different format - one that allows only one label per entity (even if it's still OWL otherwise).
What I'd do is delete all non french labels. Could be done with code parsing the XML itself or with OWLAPI code, so that you have a tool to run against your ontology every time you want to refresh the export you make to Omeka S.
add a comment |
From what you describe, the task you're trying to accomplish is to prepare the ontologies for export to a slightly different format - one that allows only one label per entity (even if it's still OWL otherwise).
What I'd do is delete all non french labels. Could be done with code parsing the XML itself or with OWLAPI code, so that you have a tool to run against your ontology every time you want to refresh the export you make to Omeka S.
add a comment |
From what you describe, the task you're trying to accomplish is to prepare the ontologies for export to a slightly different format - one that allows only one label per entity (even if it's still OWL otherwise).
What I'd do is delete all non french labels. Could be done with code parsing the XML itself or with OWLAPI code, so that you have a tool to run against your ontology every time you want to refresh the export you make to Omeka S.
From what you describe, the task you're trying to accomplish is to prepare the ontologies for export to a slightly different format - one that allows only one label per entity (even if it's still OWL otherwise).
What I'd do is delete all non french labels. Could be done with code parsing the XML itself or with OWLAPI code, so that you have a tool to run against your ontology every time you want to refresh the export you make to Omeka S.
answered Nov 15 '18 at 7:18
Ignazio
7,8861922
7,8861922
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266385%2fchange-order-for-rdfslabel-in-prot%25c3%25a9g%25c3%25a9%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Protégé puts the first created label (or comment) in first in the .owl exported file -- it seems that Protege orders saved labels alphabetically (by value first, by language second). Hence: 1. Replace all
<rdfs:label xml:lang="fr">
with<rdfs:label xml:lang="fr">!
in your text editor. 2. Open your ontology in Protege, edit something, save the ontology. 3. Replace all<rdfs:label xml:lang="fr">!
with<rdfs:label xml:lang="fr">
in the text editor.– Stanislav Kralin
Nov 12 '18 at 18:22
@StanislavKralin Thanks I was assuming wrongly it was the first created label in top. This is a good workaround but I am interested also if there is a other way (less manual).
– ppr
Nov 13 '18 at 8:45
"less manual" – by "replace", I mean Ctrl+H or something like.
– Stanislav Kralin
Nov 16 '18 at 10:11