Je publie la traduction française de la recommendation SKOS. SKOS…
SKOS Play : alignments, SKOS-XL, autocomplete search fields, and more !
There have been a lot of improvements and news on SKOS Play recently, since the last time I took the time to write about it. Here is what you can do with the latest version of the application.
Print thesaurus alignments
The major enhancement recently added is the ability to generate tables to display thesaurus alignments (declared using the mapping properties skos:exactMatch, skos:broadMatch, skos:narrowMatch or skos:relatedMatch). Here is an example of printing a thesaurus alignment in PDF :
This architecture thesaurus from french Ministry of Culture (published in data.culture.fr using GINCO) is aligned with Getty AAT, french DBPedia and Rameau (published in data.bnf.fr). The table is listing source concepts, and for each of them, the mappings to the other thesauri. It is also possible to generate a slightly different output by grouping the mappings by target thesaurus rather than with an alphabetical listing of the source concepts.
Note that this is real Linked Data here : SKOS Play doesn’t simply display the URIs of the target concepts (e.g. http://data.bnf.fr/11936410/abattoirs/), but rather their labels by following the URIs and fetching the labels dynamically. This can obviously take a long time if the alignement is large. Of course, each target concept label is clickable so that you can navigate to the corresponding page.
Print OWL files, too !
In some cases, people working on large ontologies with lots of classes (e.g. medical ontologies, like HRDO with > 13000 classes) also have a need to print them, much like people working on thesauri. This is why SKOS Play now includes an option to convert an OWL class hierarchy to SKOS, to be able to print it. Of course by doing so we lose the rest of the ontology structure; here is exactly what this conversion does :
- the OWL Ontology becomes a SKOS concept scheme;
- every OWL class becomes a SKOS concept, and is declared « skos:inScheme » of the generated concept scheme;
- the rdfs:subClassOf links yields skos:narrower and skos:broader relations;
- rdfs:labels on OWL classes generate skos:prefLabel;
While this remains pretty basic, it gives a nice a easy path to use SKOS Play to display OWL classes hierarchies.
Use data expressed using SKOS-XL
SKOS comes with the optional extension SKOS-XL, that allows to declare the labels themselves as separate resources. Until now SKOS Play was not compatible with this extension. It is now the case, with an additionnal option (activated by default) that will apply simple inference rules to regenerate internally plain SKOS labels (pref, alt or hidden) from their SKOS-XL equivalent.
Generate autocomplete field with the thesaurus terms
A typical usage of a thesaurus in a search system is to guide the user typing queries in an input field. While this functionnaly is usually achieved using search engines autocomplete features (see SolR suggester), it is sometimes desirable to be able to do the same entirely on the client side when no search engine is available. And this is what SKOS Play does :
1. You see a page with an input field saying « search 1234 terms in thesaurus Y » :
2. When you start typing, you get suggestions from the thesaurus, with definition and scope note displayed for each of them :
3. When clicking on a suggested term, the corresponding concept URI is selected and can be sent to a search index to fetch resources indexed on that concept.
This is implemented using JQuery UI autocomplete widget and everything is on the client side – no server required ! the page can be saved locally and adapted to an existing search portal. The terms fueling the completion list are written in JSON in the page :
{ "uri" : "http://skos.um.es/unescothes/C00007", "label" : "Abstract journals", "pref" : "Abstracts", "type" : "alt" }, { "uri" : "http://skos.um.es/unescothes/C03290", "label" : "Abstract reasoning", "pref" : "Reasoning", "type" : "alt" }, { "uri" : "http://skos.um.es/unescothes/C00007", "label" : "Abstracts", "scopeNote" : "The usually non-critical indication of the subject contents of a document, aiming to permit the user a decision about the relevance of the document.", "type" : "pref" }
Generate professional-looking PDF documents for your thesauri
SKOS Play is used by french Ministry of Culture to generate professional-looking PDF documents, in their effort to structure, align and publish controlled vocabularies on http://data.culture.fr/thesaurus/ (using GINCO and GINCO Diffusion). SKOS Play was used to generate the final PDF rendering of the « Thesaurus de la désignation des oeuvres architecturales et des espaces aménagés » and the « Thesaurus de la désignation des objets mobiliers« .
These PDFs include :
- an alphabetical index containing for each term :
- the corresponding preferred term, if the term is non-preferred;
- if the term is a preferred term :
- its broader, narrowers, related and top term (clickable to navigate in the PDF);
- a scope note and a definition (if available);
- a hierarchical display, with each entry being clickable to navigate to the alphabetical index;
- translation tables, when the thesaurus is multilingual;
An effort as been made on the page layout and design to achieve optimal readability.
Generate permuted indexes (KWIC)
SKOS Play also allows you to generate permuted indexes from the labels of the thesaurus :
This can be used to easily search a term in the thesaurus, or check in which label a given word appear. Note that the computed permutations are correctly excluding stopwords based on the chosen language.
As usual, the output is available in HTML or PDF.
More to come in 2015 !
Probably new enhancements will come in 2015 :
- display images associated with each concepts, if they are available;
- handle right-to-left languages (arabic);
and more, based on your feedback, most welcomed as usual !
Bravo pour l’excellent SKOS Play.
De quel document est extrait l’image en début de billet ?
Le document n’est pas encore publié mais il s’agit des alignements du Thésaurus de la désignation des oeuvres architecturales et des espaces aménagés du Ministère de la Culture. Le travail sur les alignements est encore en cours et sera mis en ligne par le Ministère prochainement (je n’ai pas de date, je l’indiquerai ici quand ce sera disponible).