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.
Installation
Skosify requires Python 3.6+.
pip install --upgrade skosify
Usage
As command line script:
skosify myvoc.owl -o myvoc-skos.ttl --label "My Ontology"
This will read the file myvoc.owl in RDF/XML format and write SKOS file myvoc-skos.ttl in Turtle format, setting the name of the Concept Scheme to 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)
See the API Reference for documentation of the public API of this module. Everything not listed there might change in a future version.
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
See background for history, related works, publications etc.
Metadata
Release files for skosify 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skosify-2.3.0.tar.gz | 25.6 kB | Without provenance | Details for skosify-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skosify-2.3.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for skosify-2.3.0-py2.py3-none-any.whl |
Total release size: 48.6 kB
Release files / skosify-2.3.0.tar.gz
| Download URL | skosify-2.3.0.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
012beee78f23038edbb5783f7163afb3fedd2d8a0b68cfc2408566df59bb5611
|
|
BLAKE2b-256 checksum How to use checksums |
c761066294d0711ddf554e67e8185006b9e67530e59f11f96a3e9120ac3ff148
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Release files / skosify-2.3.0-py2.py3-none-any.whl
| Download URL | skosify-2.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c147043c2abe9ca64489eca0f8a5ca891b84118d298027e40287bdd6819668d4
|
|
BLAKE2b-256 checksum How to use checksums |
b65f8bb413d47d091d7f0ee3940a7429daf82a54a68a89ca3f295b8e7b8d48fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Security for skosify 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.