Synthetic RDF graph generator based on SHACL constraints.
Project description
Synthetic RDF graph generator based on SHACL constraints.
rdf_graph_gen is a Python package that can be used to generate RDF graphs based on SHACL constraints.
The following function can be used to generate RDF data:
generate_rdf(file1, file2, number_of_entities)
- file1 is a turtle file that contains SHACL shapes.
- file2 is a turtle file that will store the generated RDF entities
- number_of_entities is the number of RDF entities to be generated.
Link on PyPi: https://pypi.org/project/rdf-graph-gen/
Link on GitHub: https://github.com/mveco/RDFGraphGen
Installation:
pip install rdf-graph-gen
After installation, this package can be used as a command line tool:
rdfgen file1 file2 number_of_entities
Examples
Examples of SHACL Shapes based on Schema.org types can be found in the generated_examples\shape_examples directory in the GitHub repo, along with generated RDF data samples for these Shapes (in the generated_examples\generated_rdf directory) .
Remarks:
- A SHACL shape has to have a 'a sh:NodeShape' property and object in order to be recognized as a Node Shape.
- sh:severity is ignored because it has no useful info.
- SHACL Property Paths are not supported
- sh:datatype can have many different values, not all are recognized.
- sh:nodeKind is ignored
- The triples generated based on properties with a sh:minCount constraint can sometimes have a smaller value than the defined minimum count. This is because sometimes the generator generates the same triple multiple times.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rdf_graph_gen-1.1.2.tar.gz.
File metadata
- Download URL: rdf_graph_gen-1.1.2.tar.gz
- Upload date:
- Size: 728.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cf7190d701518f6745bddb929f51adc08466edeba3aa598213bfe94645944b3
|
|
| MD5 |
667876b656d2eea614e45478efb7e7fb
|
|
| BLAKE2b-256 |
275ab7b53648c0e02867f4ff66c7b71f0cbfc29668f77c5ba94966eb5ab40441
|
File details
Details for the file rdf_graph_gen-1.1.2-py3-none-any.whl.
File metadata
- Download URL: rdf_graph_gen-1.1.2-py3-none-any.whl
- Upload date:
- Size: 732.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b53bf79264088e3f19b3d65c03c3b653d00f98b5da2c080c0a760a1a89bf0ad1
|
|
| MD5 |
8d60347b071579715a3825d3cb1ba65b
|
|
| BLAKE2b-256 |
f5f2f0f6d98fc0f66f07dbc3da94a7f544d9353a31b9bbbf80f2a279d877210b
|