Skip to main content

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-shacl-generator/

Link on GitHub: https://github.com/mveco/RDF_generator

Installation:

pip install rdf-shacl-generator

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

rdf_graph_gen-1.0.9.tar.gz (728.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdf_graph_gen-1.0.9-py3-none-any.whl (732.4 kB view details)

Uploaded Python 3

File details

Details for the file rdf_graph_gen-1.0.9.tar.gz.

File metadata

  • Download URL: rdf_graph_gen-1.0.9.tar.gz
  • Upload date:
  • Size: 728.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.18

File hashes

Hashes for rdf_graph_gen-1.0.9.tar.gz
Algorithm Hash digest
SHA256 fbe55efe876fc3dea4e31a55c21251f7d8a2376e587b21e1a507253c6bbc8c91
MD5 01eeea127add80bc29e23100fa5e242f
BLAKE2b-256 1889de2e0d9d68e2520671b4eff732533bdf8f4a14888e9d77812facf8034ac3

See more details on using hashes here.

File details

Details for the file rdf_graph_gen-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: rdf_graph_gen-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 732.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.18

File hashes

Hashes for rdf_graph_gen-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 cd9a19ff5feee9cfcb1c0e6c09becc6caaba43c2fc55251f30f85b09162f66b5
MD5 59df3ddbb7f3c660eb2aa7cd8a8113ae
BLAKE2b-256 e45c843545cbffa0d2b580b696d27a9677b6189b962311ab0d8283c8113c6b3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page