tematres / TemaTres-Vocabulary-Server

Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries
https://vocabularyserver.com
122 stars 53 forks source link

Better support for multilingual SKOS #2

Open gautiermichelin opened 8 years ago

gautiermichelin commented 8 years ago

Uservoice post : https://tematres.uservoice.com/forums/35866-general/suggestions/6291119-better-support-for-multilingual-skos [ (but I find it easier to tag a comment, a commit or anything on github if I do here a issue report. ]

Hi Diego,

we're here building an entire new specification for a subset of TEI (Text Encoding Initiative) XML files, for the european research EuRED project (see eured.univ-lemans.fr). We're aiming our efforts to publish skos versions of our translated vocabulary (a dozen). To be perfectly compatible to TEI recommandations, each used term should be defined either through direct definition, inside the XML, or through external reference, and there goes Tematres.

Having xml:lang title version would fulfill these requirements, whereas skos:exact match emplies to consider we have different external thesaurus versions (and not a single URL for a term). That's a challenge for us.

Do you have any idea on how to implement xml:lang ? May I be of some help ?

tematres commented 8 years ago

Hi Gautier, by default tematres include xml:lang for each language and for each target term translated Here example: http://vocabularyserver.com/unesco/fr/xml.php?skosTema=3095 or http://vocabularyserver.com/unesco/fr/api/fetchTerm/3095/skos

For the term http://vocabularyserver.com/unesco/fr/?tema=3095

It's OK? we work with other researchers and projects about TEI :)! We are interested to find the best way :)

gautiermichelin commented 8 years ago

Hi Diego,

That's what I found, but not really what I was looking for. I'm searching for a simple way to precise that for a single term, we have different labels, depending of the current language. Those are only equivalent labels to a single definition, not other linked concepts.

In a visual way, that's what we have in your example :

<skos:Conceptrdf:about="http://vocabularyserver.com/unesco/fr/?tema=3095">
<skos:prefLabelxml:lang="fr">Culture</skos:prefLabel>
<skos:inSchemerdf:resource="http://vocabularyserver.com/unesco/fr/"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3096"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3205"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3336"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3401"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3502"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3574"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3686"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3856"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=3929"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=4011"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=4076"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=4162"/>
<skos:narrowerrdf:resource="http://vocabularyserver.com/unesco/fr/?tema=4216"/>
<skos:exactMatch>
<skos:Conceptrdf:about="http://vocabularyserver.com/unesco/es/index.php?tema=3075">
<skos:prefLabelxml:lang="es">Cultura</skos:prefLabel>
</skos:Concept>
</skos:exactMatch>
<skos:exactMatch>
<skos:Conceptrdf:about="http://vocabularyserver.com/unesco/en/index.php?tema=2500">
<skos:prefLabelxml:lang="en">Culture</skos:prefLabel>
</skos:Concept>
</skos:exactMatch>
<skos:exactMatch>
<skos:Conceptrdf:about="http://vocabularyserver.com/unesco/ru/index.php?tema=2456">
<skos:prefLabelxml:lang="ru">Культура</skos:prefLabel>
</skos:Concept>
</skos:exactMatch>
<dct:created>2015-09-18 19:03:02</dct:created>
</skos:Concept>

Now, that's what I'm looking for :

<skos:Conceptrdf:about="http://vocabularyserver.com/unesco/fr/?tema=3095">
<skos:prefLabelxml:lang="fr">Culture</skos:prefLabel>
<skos:prefLabelxml:lang="es">Cultura</skos:prefLabel>
<skos:prefLabelxml:lang="en">Culture</skos:prefLabel>
<skos:prefLabelxml:lang="ru">Культура</skos:prefLabel>
<skos:inSchemerdf:resource="http://vocabularyserver.com/unesco/fr/"/>
<dct:created>2015-09-18 19:03:02</dct:created>
</skos:Concept>

Note that I'm full aware that this is not the point of the Unesco thesaurus, but that's the behaviour I'm looking for. Eventually, it can lead me to develop mutliple translation inside a single term in the Tematres interface whenever needed.

Bye,

Gautier

diego ferreyra mailto:notifications@github.com 4 avril 2016 20:06

Hi Gautier, by default tematres include xml:lang for each language and for each target term translated Here example: http://vocabularyserver.com/unesco/fr/xml.php?skosTema=3095 or http://vocabularyserver.com/unesco/fr/api/fetchTerm/3095/skos

For the term http://vocabularyserver.com/unesco/fr/?tema=3095

It's OK? we work with other researchers and projects about TEI :)! We are interested to find the best way :)

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/tematres/TemaTres-Vocabulary-Server/issues/2#issuecomment-205424169

tematres commented 8 years ago

HI :) I'm not sure about the solution :/ Can you copy an example about expected XML code?

cheers :)

gautiermichelin commented 8 years ago

Hi Diego,

I'm back on that question :-) The idea is to have all labels under a single reference number. On the XML I put at the end of my last message, you see it. The 3095 term has a single existence, but different labels attached to it. It seems to me that it is skos valid too. That would imply beeing able to store several labels in the DB, attached to a single concept.

oddrunpauline commented 4 years ago

Hi, We have exactly the same need as gautiermichelin concerning SKOS export from TemaTres. We're planning to publish our thesaurus on a platform other than TemaTres, and would prefer not to expose the translated terms as exactMatch-related concepts with separate URIs, but rather just as different labels of the main concept. For now, we'll just have to process the SKOS export ourselves to fit our purpose, but it would be very nice if this could come directly from TemaTres. Any plans for doing something about this?

tematres commented 4 years ago

Hi @oddrunpauline :) please be patient with my english :/. If the terms are alternate terms (in any of multiple cases of alternate lexical possibilities), you can create a new type of alternative relation (Menu -> Config -> Create new type of relations). In this case the label will be exposed as altTerm. With which skos-core label you want to expose the terms  

olufine commented 4 years ago

Hi again, The terms I am talking of are preferred terms in another language than the main vocabulary. By doing as you suggest one can get any label in any language as UF/USE labels, which become altLabels in the SKOS output. However, the language code (XML lang) is wrong, and I want prefLabel, not altLabel. According to SKOS, it's perfectly all right to assign more than one prefLabel to a concept, as long as they are all of different languages. And that is how I would like to represent our multilingual thesaurus.

For example: For my term 401 Illustrerte verk in my Norwegian thesaurus, there is a corresponding term 415 Illustrated works in a target (English) vocabulary. This is now exported as

<skos:Concept rdf:about="https://id.nb.no/vocabulary/ntsf/401">
<skos:prefLabel xml:lang="nb">Illustrerte verk</skos:prefLabel>
<skos:altLabel xml:lang="nb">Bildeverk</skos:altLabel>
<skos:scopeNote xml:lang="nb">Verk som består helt eller hovedsakelig av bilder, eller som inkluderer bilder som forklarer, utfyller eller "forskjønner" tekst eller innhold.</skos:scopeNote>
<skos:inScheme rdf:resource="https://id.nb.no/vocabulary/ntsf"/>
-<skos:exactMatch>
-<skos:Concept rdf:about="https://id.nb.no/vocabulary/ntsf/415">
<skos:prefLabel xml:lang="en">Illustrated works</skos:prefLabel>
</skos:Concept>
</skos:exactMatch>
<dct:created>2020-10-05 12:11:43</dct:created>
</skos:Concept>

Instead I would like the SKOS export to be like this:

<skos:Concept rdf:about="https://id.nb.no/vocabulary/ntsf/401">
<skos:prefLabel xml:lang="nb">Illustrerte verk</skos:prefLabel>
**<skos:prefLabel xml:lang="en">Illustrated works</skos:prefLabel>**
<skos:altLabel xml:lang="nb">Bildeverk</skos:altLabel>
<skos:scopeNote xml:lang="nb">Verk som består helt eller hovedsakelig av bilder, eller som inkluderer bilder som forklarer, utfyller eller "forskjønner" tekst eller innhold.</skos:scopeNote>
<skos:inScheme rdf:resource="https://id.nb.no/vocabulary/ntsf"/>
<dct:created>2020-10-05 12:11:43</dct:created>
</skos:Concept>

A cannot see any way of obtaining that as TemaTres is now. Or is it something I haven't understood here?