semantic-transformers
A library and a curated collection of parsers that bridge raw instrument output files and the semantic-schemas knowledge graph pipeline.
What this repository contains
semantic-transformers/
src/semantic_transformers/ Python library (Transformer, QuickMapper, …)
parsers/ Machine-specific file parsers
<domain>/ Mirrors the semantic-schemas folder structure
<specialisation>/
<instrument>/ One folder per instrument model
parser.py Language-agnostic parsing logic
README.md Quick-start, schema compatibility, and known limitations
CHANGELOG.md Schema compatibility history
<lang>/ One subfolder per export language (e.g. de/, en/)
column_mapping.json Maps locale-specific column names to ontology IRIs and units
docs/ Guides for users and contributors
The two parts
1. The library (src/semantic_transformers/)
| Class | Role |
|---|---|
Parser |
Protocol to implement when adding support for a new instrument |
ParseResult |
What every parser returns: simplified JSON + DataFrame |
Transformer |
Runs parsing → JSONata transform → RDF graph |
TransformResult |
What Transformer.run() returns: RDF graph + DataFrame |
QuickMapper |
Turns any tabular file into RDF using a simple YAML mapping (no parser needed) |
2. The parsers (src/semantic_transformers/parsers/)
Each parser targets a specific instrument model. The folder path mirrors the
schemas/ tree in semantic-schemas:
| Schema | Instrument | Import path |
|---|---|---|
characterization/tensile-test/TTO |
Zwick/Roell (testXpert III) | semantic_transformers.parsers.characterization.tensile_test.testxpert_iii |
Installation
Using pip (recommended)
# Install the transformers library
pip install semantic-transformers
# Optional: install optional dependencies
pip install semantic-transformers[excel] # for Excel file support
pip install semantic-transformers[dev] # for development and testing
Development installation
Both repositories are designed to be cloned as siblings under a shared folder:
mkdir semantic-dataspace && cd semantic-dataspace
git clone https://github.com/Semantic-Dataspace/semantic-schemas
git clone https://github.com/Semantic-Dataspace/semantic-transformers
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e semantic-transformers/
pip install jupyterlab # only needed for the interactive notebooks
Two ways to use this library
Option A: you have a supported instrument
Use a ready-made parser and the matching schema notebook. For a Zwick/Roell tensile test:
jupyter lab semantic-schemas/schemas/characterization/tensile-test/TTO/docs/2_tensile_test_csv_workflow.ipynb
Edit Step 0 (one line, point to your file) and run all cells. Done.
Option B: you have a tabular file with no existing parser
Use QuickMapper. Provide a short YAML that names the columns and points each
one at an ontology class IRI:
from semantic_transformers import QuickMapper
mapping = {
"label": "my experiment",
"columns": {
"Force": {
"iri": "https://w3id.org/pmd/tto/StandardForce",
"unit": "http://qudt.org/vocab/unit/N",
},
"Extension": {
"iri": "https://w3id.org/pmd/tto/Extension",
},
},
}
result = QuickMapper(mapping).run("my_data.csv")
print(result.graph.serialize(format="turtle"))
print(result.dataframe.head())
Supported file formats: CSV, TSV, Excel (.xlsx), Parquet, JSON. See the QuickMapper notebook for a guided walkthrough.
Contributing
To contribute or run tests locally, see CONTRIBUTING.md for setup and development workflow instructions.
Documentation
- Getting started: convert your first instrument file
- QuickMapper walkthrough: turn any tabular file into RDF
- Adding a parser: support a new instrument or handle file variants
Metadata
Release files for semantic-transformers 0.4.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 |
|---|---|---|---|---|
| semantic_transformers-0.4.0.tar.gz | 30.0 kB | With provenance | Details for semantic_transformers-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| semantic_transformers-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for semantic_transformers-0.4.0-py3-none-any.whl |
Total release size: 58.3 kB
Release files / semantic_transformers-0.4.0.tar.gz
| Download URL | semantic_transformers-0.4.0.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f235b9b992a310e57dd865e6cecc7479d5cf034e6880526bb5882f7872276b3
|
|
BLAKE2b-256 checksum How to use checksums |
44401cdeabcd3ab564e4f25ef52f072daf3d13b22fa29c352fe6b0854348c980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 24, 2026.
Transparency logRelease files / semantic_transformers-0.4.0-py3-none-any.whl
| Download URL | semantic_transformers-0.4.0-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3be579aa7e8eec3abcc4c05b3b9008c258febf6cc6d54d06462ee6d84b6ae67f
|
|
BLAKE2b-256 checksum How to use checksums |
f3e589a41c82ac17779dcf441de1a246b84dc39dd6c5b75ae89b924a13aecc02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 24, 2026.
Transparency logSecurity for semantic-transformers 0.4.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for semantic_transformers-0.4.0.tar.gz
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 Apr 24, 2026.
Transparency logA 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.