Skip to main content

Shacl graph generator

Project description

Shaclgen takes either a data graph(s) or schema(s) as input and generates a basic shape file based on the classes and properties present.

Shape files from data graphs: By default, the input graph is processed as a data graph (instance triples). Three formats are possible for data graphs: simple, nested, and extended.

  • Simple: Each class and property generate individual Node- and PropertyShapes.

  • Nested: Property shapes will be nested in nodeshapes iif they occur with one class.

  • Extended: Expands nested shapes to create individual property shapes for each property, in addition to nesting them when appropriate.

Shape files from ontologies: If the input is a schema or ontology, shaclgen generates a nested shape file: properties with rdfs:domain defined in the ontology will be nested within the appropriate NodeShape. rdfs:range definitions for XML and rdfs datatypes are included.

Added support for OWL constructions is planned.


Installation

Using pip:

pip install shaclgen

From source:

https://github.com/alexiskeely/shaclgen

Command line use:

$ shaclgen graph [optional arguments]

Example usage:

$ shaclgen https://www.lib.washington.edu/static/public/cams/data/datasets/uwSemWebParts/webResource-1-0-0.nt

Command line arguments:

positional arguments:
graph                 The data graph(s).
optional arguments:
-h, --help            show this help message and exit
-nf, --nested         generates a nested shape file
-ef, --extended       generates an expanded shape file
-o, --ontology        input file(s) or URL(s) is a schema or ontology
-s SERIALIZATION, --serialization SERIALIZATION
                      result graph serialization, default is turtle

This project is still in development. Comments, questions, and issues are welcome!

Contact alexiskm at uw dot edu.

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

shaclgen-0.1.4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

shaclgen-0.1.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file shaclgen-0.1.4.tar.gz.

File metadata

  • Download URL: shaclgen-0.1.4.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for shaclgen-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b679459b6afd251dd53921fd8466bff3f9e1d8c2f2ff0ef28f98a7ce9f29310c
MD5 a0e68d7bc712d6fdf3331be41652cd6c
BLAKE2b-256 0456be17aae70cbed19132b4446a9cd671617377c5916fc9e09958c92fa416dc

See more details on using hashes here.

File details

Details for the file shaclgen-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: shaclgen-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for shaclgen-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 df17270072439e2edd57c9cc8049396a85b43efe0f393f5f96a50805b0784fc8
MD5 9d93acb94ec73e3e5e7bfaec3c4d8c1e
BLAKE2b-256 1dffd5b463114f7ae69cd05f3e3e88f2de3f5ab6c1345bee017288cd3d340986

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