Skip to main content
https://badge.fury.io/py/skosify.svg https://travis-ci.org/NatLibFi/Skosify.svg?branch=master https://readthedocs.org/projects/skosify/badge/?version=latest https://codecov.io/gh/NatLibFi/Skosify/branch/master/graph/badge.svg

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

Author and Contributors

  • Osma Suominen

  • Jakob Voß

  • Dan Michael O. Heggø

  • Alex Kourijoki

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)

Source distribution for skosify 2.3.0
File Size Uploaded
skosify-2.3.0.tar.gz 25.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skosify 2.3.0
File Interpreter ABI Platform
skosify-2.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page