Transforming your ontology into YARRRML mappings
This script generates a YARRRML template from the input ontology. The transformations made are:
| Ontology | Mapping |
|---|---|
| Class | TriplesMap + Simple PredicateObjectMap (rdf:type, class) |
| Data Property | Simple PredicateObjectMap in the TriplesMap corresponding to the class defined in the domain of the property |
| Object Property | Join PredicateObjectMap in the TriplesMap corresponding to the class defined in the domain of the property and where the parentTriplesMap is the TriplesMap corresponding to the class defined in the range of the property |
How to execute it
Execution from CLI
The input ontology can be serialized in NTRIPLES, RDF/XML or Turtle
python3 -m pip install owl2yarrrml
python3 -m owl2yarrrml -i paht/ontology.xml -o ouput_path/mapping.yml
Execution as a library
The ontology has to be provided in RDF/XML.
import owl2yarrrml
import owlready2
ontology=owlready2.get_ontology("file://path/to/my/ontology.xml").load()
yarrrml_content = owl2yarrrml.translate(ontology)
Authors
CiTIUS - Universidade de Santiago de Compostela (2023-now) and Ontology Engineering Group - Universidad Politécnica de Madrid (2020-2023):
Metadata
Release files for owl2yarrrml 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| owl2yarrrml-1.2.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| owl2yarrrml-1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / owl2yarrrml-1.2.tar.gz
| Download URL | owl2yarrrml-1.2.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba1bc53a68dc9e6a9be909153c4e948aec50e210e1a4694264e41b4cd3825129
|
|
BLAKE2b-256 checksum How to use checksums |
f403d45020159122621173256a0ffb2d8cae43a7dba1932a5801502d33126c5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2025.
Transparency logRelease files / owl2yarrrml-1.2-py3-none-any.whl
| Download URL | owl2yarrrml-1.2-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
938db037747acb65bd150a859b3d10b03f6ef21069c346be4c1f2c31cf86916e
|
|
BLAKE2b-256 checksum How to use checksums |
811979eb0020a579b6417d6355be229302311f34f06bab09d6137c9a09c38760
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2025.
Transparency log