Re: SHACL shapes generation

TopBraid tools have a feature to discover a SHACL schema from arbitrary 
instance data. It is no rocket science, here is the description:

/**
  * Takes an (empty) shape definition and its target nodes and suggests 
property shape
  * definitions based on various heuristics.
  *
  * Currently supported:
  * - if a property never has more than one value then it gets sh:maxCount 1
  * - if a property is always present, it gets sh:minCount 1
  * - sh:nodeKind generated depending on kinds of values
  * - sh:datatype if all values have the same datatype
  * - sh:class if all values have the same rdf:type
  *
  * Possible future improvements:
  * - generate sh:or on datatypes or classes
  * - remove rdf:types that are subclasses of others
  * - generate sh:hasValue if all values are the same (?)
  */

In TopBraid Composer (which has a 30 days evaluation period), this is 
accessible under Model > Derive SHACL shapes...

There is also a converter from RDFS/OWL classes to SHACL, using rules 
that are expressed in SHACL-AF (mostly SPARQL CONSTRUCTs with a little 
bit of JavaScript). When you download TBC you can find those rules in 
the file TopBraid/SHACL/owl2shacl.ttl

Holger


On 2021-04-19 6:20 pm, Kashif Rabbani wrote:
> Hi everyone,
>
> We are studying SHACL shapes generation. I was wondering which tools 
> or approaches are being used by the community to generate SHACL or 
> ShEx shapes for large RDF graphs?
>
> Regards,
>
> Kashif Rabbani.
>
>

Received on Monday, 19 April 2021 23:32:02 UTC