DaniFdezAlvarez / shexer

Apache License 2.0
26 stars 2 forks source link

Print example values (URI / literal) for Node Constraints of each Shape #154

Closed yayamamo closed 1 month ago

yayamamo commented 7 months ago

For each ShapeExpression, it would be convenient for a user to validate a given RDF dataset if a resultant ShEx file contains URIs or literals sampled from the data for Node Constraints of each Shape as comments. Here's an example.

:Class  [<http://purl.obolibrary.org/obo/>~]  AND   # 183126 instances
# http://purl.obolibrary.org/obo/CHEBI_10
{
   rdf:type  [owl:Class]  ;                                    # 100.0 % (183126 instances).
   <http://www.geneontology.org/formats/oboInOwl#id>  xsd:string  ?;
# "CHEBI:10"^^xsd:string
            # 89.87636927579918 % (164587 instances). obj: xsd:string. Cardinality: {1}
   rdfs:label  xsd:string  ?;
# "(+)-Atherospermoline"^^xsd:string
            # 89.87636927579918 % (164587 instances). obj: xsd:string. Cardinality: {1}
...