- From: Holger Knublauch <holger@topquadrant.com>
- Date: Wed, 27 Nov 2019 10:46:01 +1000
- To: semantic-web@w3.org
- Message-ID: <e3d55314-fd68-20ec-b7a3-4557abb63c8a@topquadrant.com>
On 27/11/2019 02:55, Nicola Carboni wrote: > Dear all, > > I am searching for a way to create complex ontological alignments. > I would like to state that two patterns of type 1-to-n are equivalent. > > The typical use case I have in mind is the declaration of equivalence > between a flat statement and a property chain, as in the two patterns > below: > > |@prefix:<http://example.org/>.@prefixex:<http://ontology.org/example>.ex:bookex:hasauthor"John".:book:hasbeencreated:creation_event.:creation_event:carried_out:person.:person:is_identified_by:appellation.:appellationrdfs:label"John".| In the scenario above, what is the relation between ex:book and :book, and can you define some rule on how to create one from the other? Is it "same-local-name-but-different-namespace"? If ex:book and :book are identical then a SHACL sh:equals constraint can be used ex:BookShape a sh:NodeShape ; sh:property [ sh:path ( :hasbeencreated :carried_out :is_identified_by rdfs:label ) ; sh:equals ex:hasauthor ; ] . https://www.w3.org/TR/shacl/#EqualsConstraintComponent Note that SHACL includes a syntax for SPARQL-like property path expressions, and the value of sh:path above is a property chain (represented as a simple rdf:List). Other types of paths are supported too: https://www.w3.org/TR/shacl/#property-paths > another important type of equivalence, but slightly different, which I > would like to declare is the one between these two patterns: > > |@prefix:<http://example.org/>.@prefixex:<http://ontology.org/example>.ex:Architectrdfs:label"John".:Person:classifiedAs<http://vocab.getty.edu/aat/300024987>;rdfs:label"John".<http://vocab.getty.edu/aat/300024987>agvp:Concept;rdfs:label"architects"@en.| > > The first one declare an instance of the class Artist according to an > ontology(x), the second classify as artist, using a controlled > vocabulary term, an instance of a person declared using the ontology (y). > > Do you know how can I express such alignments? > I am also unclear whether you want to use alignments to validate constraints (e.g. "does pattern 2 exist for pattern 1"), or to construct/infer one pattern out of the other. The complexity of the scenario above indicates that you may want to use SPARQL, because then you can more easily look up values through matches, e.g. to match "architects"@en to ex:Architect using some look-up table, and because SPARQL gives you a maximum of expressiveness. - If you want to validate constraints, you could use SHACL-SPARQL constraints: https://www.w3.org/TR/shacl/#sparql-constraints - If you want to construct target triples, you could use SHACL-AF rules: https://w3c.github.io/shacl/shacl-af/#rules Hope this helps, a bit... Holger
Received on Wednesday, 27 November 2019 00:46:07 UTC