The “Transform” service enables to obtain terminology in SKOS-XML format or to convert a terminology initially in SKOS-XML format into another format.
The modules offered by this service can be grouped into three types: correction, enrichment and conversion.
These modules are in particular intended to correct anomalies previously detected by the “Control” service.
Files containing “skos:Concept” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Concept’]]” are processed by this service.
At the level of each concept, this service operates as follows:
At the end of this process, check the file again using the Controlling a SKOS/RDF-XML file at the concept level service to ensure that there are no more duplicates.
Files containing “skos:Concept” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Concept’]]” are processed by this service.
If a concept A is associated to a concept B through the skos:related property, the concept B must be associated with the concept A because the relation is symmetrical. Cf. SKOS Reference (Axiom S23).
If this condition is not checked, this service allows inserting the missing “skos: related” property.
Note that this treatment does not apply to any sub-properties of the skos: related property.
Files containing “skos:Collection” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Collection’]]” or “rdf:Description[rdf:type[@rdf:resource=’http://purl.org/iso25964/skos-thes#ConceptGroup’]]” are processed by this service.
The hierarchical relationship between a collection A and a collection B is expressed using the “isothes:superGroup” property. The presence of an “isothes:subGroup” property (which is the inverse relationship) at the level of collection B is not mandatory because it is inferred from the “isothes:superGroup” property.
However, the proper functioning of some applications (like Skosmos) requires the presence of both relationships. This service allows to insert at the level of the broader collection as many “isothes:subGroup” properties as narrower collections of this collection.
Files containing “skos:Concept” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Concept’]]” are processed by this service.
This service inserts two classes at the beginning of a SKOS/RDF-XML file:
– a “cc:License” class with the default CC-BY 4.0 Creative Commons license that should be changed if the resource is released under a different license.
– a “skos:ConceptScheme” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#ConceptScheme’]]” class with:
After the fields have been generated, their textual content must be completed and validated by the user.
Files containing “skos:ConceptScheme” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#ConceptScheme’]]” are processed by this service.
This service inserts a “skos:hasTopConcept” property into the “ConceptSCheme” block for each concept that does not have a “skos:broader” property.
Do not use this service for unstructured or loosely structured resources.
Files containing “skos:Concept” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Concept’]]” are processed by this service.
This service inserts a “skos:topConceptOf” property into each concept that does not have a “skos:broader” property.
Do not use this service for unstructured or loosely structured resources.
Files containing “skos:Collection” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Collection’]]” or “rdf:Description[rdf:type[@rdf:resource=’http://purl.org/iso25964/skos-thes#ConceptGroup’]]” are processed by this service.
The hierarchical relationship between a collection A and a collection B is expressed using the “isothes:superGroup” property. The presence of an “isothes:subGroup” property (which is the inverse relationship) at the level of collection B is not mandatory because it is inferred from the “isothes:superGroup” property.
However, the proper functioning of some applications (like Skosmos) requires the presence of both relationships. This service allows to insert at the level of the broader collection as many “isothes:subGroup” properties as narrower collections of this collection.
Files containing “skos:Concept” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Concept’]]” are processed by this service.
This service allows the replacement of the identifiers (URI) of a SKOS/RDF-XML file by ARK identifiers built according to the recommendations of the California Digital Library (CDL).
An ARK identifier has the following syntax:
The transformation is performed in two stages:
1- Replacement of the resource URI (at the level of the concept scheme) by the following generic URI: http://my_site.fr/ark:/NAAN/ABC. The old URI is kept in a “dc:identifier” field.
At the concept level, an 8-character alphanumeric sequence followed by a dash and then a “check sum” completes this prefix and constitutes a unique ARK identifier for each concept of the resource.
Prefix | Unique identifier |
http://my_site.fr/ark:/NAAN/ABC | -CGT6ZZBQ-F |
2- URI recalculation for:
To generate ARK identifiers that comply with CDL recommendations (see details here), the generic URI must be replaced as follows:
Here is a real example: http://data.loterre.fr/ark:/67375/1WB
Note that in the absence of NAAN, the URI can not be considered an ARK identifier but can nevertheless be used without the ark:/NAAN/ part, the last part being a unique identifier.
Loterre offers various conversion modules.
This transformation allows to generate a SKOS file from a spreadsheet (Excel, OpenOffice, etc.) saved as CSV.
Loterre offers two variants of this service, depending on whether the field separator in the CSV file is a semicolon or a comma:
n.b.: with a CSV file whose separator is a semicolon use double quotation marks (” / quote) as text delimiter for fields that contain semicolons as ponctuation signs. Add quotation marks around such fields to avoid spliting of text at semicolon. If text contains quotes, they must be doubled.
The input file must:
Terminological data | Label to use xx = 2 digit ISO code for language (*) |
Comment |
Preferred label | prefLabel_xx | A “preflabel_en” is expected |
Alternative label | altLabel_xx | |
Hidden label | hiddenLabel_xx | |
Definition | definition_xx | |
Note | note_xx | |
Scope note | scopeNote_xx | |
Editorial note | editorialNote_xx | |
History note | historyNote_xx | |
Change note | changeNote_xx | |
Example | example_xx | |
Broader term | broader_xx | A “broader_en” is expected |
Related term | related_xx | A “related_en” is expected |
Group (collection) | group_xx | A “group_en” is expected |
Exact match | exactMatch | |
Close match | closeMatch | |
Broad match | broadMatch | |
Narrow match | narrowMatch | |
Related match | relatedMatch |
(*) Replace “xx” by 2 digit ISO code for language; example “prefLabel_en” for the English preferred label. See list of ISO 639-1 codes.
The data is transformed as follows:
In addition, the transformation also inserts two blocks at the beginning of the SKOS/RDF-XML file:
– a “cc:License” block with the default Creative Commons CC-BY 4.0 license that should be changed if the resource is released under a different license.
– a “skos:ConceptScheme” block with:
If the concepts do not have identifiers, the default URI of the resource is “http: //www.mysite/vocabs/ABC”. It is also the root of the URI of concepts, relationships and possible collections. It must be replaced as follows:
At the concept level, the URI is a concatenation of the resource’s URI with a unique identifier; at the collection level, the URI is a concatenation of the resource’s URI with the group name by replacing the spaces with “_”.
To switch to ARK identifiers, use the transformation “Assign ARK identifiers to a valid SKOS/RDF-XML file”.
Files containing “skos:Concept” or “rdf:Description[rdf:type[@rdf:resource=’http://www.w3.org/2004/02/skos/core#Concept’]]” are processed by this service.
Loterre offers two variants of this service, depending of the field separator desired in the resulting CSV file:
The output file can be imported into a spreadsheet (Excel, LibreOffice, etc.) for editing (see the import procedure in Excel below).
The data are transformed as follows:
A first row “column headers” is created from the elements (skos or other properties) used to describe the different concepts of the SKOS/RDF-XML file:
Then, a line is generated for each concept of the file:
It should be noted that:
To import a CSV file to Excel:
The file modified in Excel and saved as CSV file can be transformed into SKOS using the service “Transform a semicolon-separated CSV file into a SKOS/RDF-XML file” or “Transform a comma-separated CSV file into a SKOS/RDF-XML file” depending on the type of separator used while saving the CSV file.
This transformation allows to generate an HTML file from a valid SKOS file. It processes files containing “skos:Concept” or “rdf:Description” of type “Concept”.
Two variants are proposed by Loterre, depending on the language version chosen:
The terminology entries are presented in the alphabetical order of preference (French or English):
The richness of the information displayed will depend on the content and structuring of the original SKOS file.
Transform a SKOS-XML into a PDF file
This transformation generates a PDF file from a valid SKOS file.
Two variants are proposed by Loterre, depending on the language version chosen for the resource:
Several sections are produced depending on the content and structure of the file:
Additional pages are inserted:
Note that the cover pages can be replaced by editing the final file with a PDF editor such as PDF Sam Basic.