SKOS converter for RDFS/OWL/SKOS vocabularies.
Project description
Python script for converting to SKOS.
This program accepts a thesaurus-like vocabulary expressed as RDFS, OWL or SKOS as input. It produces a clean SKOS representation, which attempts to represent the input data losslessly using SKOS best practices. When given SKOS as input, it will be cleaned up, validated and enriched to follow the SKOS specification and related best practices.
Usage
As command line script:
skosify myontology.owl -o myontology-skos.rdf --label "My Ontology"
Run skosify --help for more usage information.
As Python library:
import skosify # contains skosify, config, and infer
voc = skosify.skosify('myontology.owl', label='My Ontology')
voc.serialize(destination='myontology-skos.rdf', format='xml')
rdf = Graph()
rdf.parse('myontology.owl')
config = skosify.config('owl2skos.cfg')
voc = skosify.skosify(rdf, **config)
skosify.infer.skos_related(rdf)
skosify.infer.skos_topConcept(rdf):
skosify.infer.skos_hierarchical(rdf, narrower=True)
skosify.infer.skos_transitive(rdf, narrower=True)
skosify.infer.rdfs_classes(rdf)
skosify.infer.rdfs_properties(rdf)
The skosify function gets a list of RDF input files and/or Graphs, and named configuration settings.
Additional documentation can be found in the GitHub project wiki
Additional scripts
The scripts directory contains two additional scripts to be used together with Skosify:
skosify.cgi a web application to use Skosify
sparqldump.py a command line client to download RDF via a SPARQL endpoint
See also
Publications
Osma Suominen and Christian Mader: Assessing and Improving the Quality of SKOS Vocabularies. Journal on Data Semantics, vol. 3, no. 1, pp. 47-73, June, 2014 (PDF)
Osma Suominen and Eero Hyvönen: Improving the Quality of SKOS Vocabularies with Skosify. Proceedings of the 18th International Conference on Knowledge Engineering and Knowledge Management (EKAW 2012), Springer-Verlag, Galway, Ireland, October, 2012 (PDF)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for skosify-2.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 149d12b9507fe9f5838bcee7236a298870dfa42a38b189ff4403661ae4e4519b |
|
MD5 | 3b409159a3e9f53fc4046331f6a45ff7 |
|
BLAKE2b-256 | 7de9be4a7bc68c05ff3428dab37f8fa917eb17eeb7d6faef158134fc60213e5f |