ePO icon indicating copy to clipboard operation
ePO copied to clipboard

Eliminate the redefinition of properties of common vocabularies

Open cristianvasquez opened this issue 2 years ago • 3 comments

Some values of properties from external vocabularies are being rewritten, and need to be removed.

Examples of such properties are: rdfs:range or rdfs:domain

This can pose difficulties in the case of using the vocabularies together as one graph

I'm linking a list of triples that were redefined in this gist, it might serve as a reference for this task. Also the original values

The list was extracted from a set of vocabularies in a triplestore using this query:

SELECT distinct ?graph ?s ?p ?o
WHERE {
  graph ?graph {
    ?s a ?type .
    ?s ?p ?o .
    FILTER (isIRI(?o)) .
  }
}

The list of vocabularies taken into account:

  • [ ] http://www.w3.org/2006/time#
  • [ ] http://www.w3.org/ns/locn#
  • [ ] http://www.w3.org/ns/org#
  • [ ] http://www.w3.org/ns/person#
  • [ ] http://www.w3.org/ns/adms#
  • [ ] http://www.w3.org/2004/02/skos/core#
  • [ ] http://www.w3.org/2002/07/owl#
  • [ ] http://www.w3.org/1999/02/22-rdf-syntax-ns#
  • [ ] http://xmlns.com/foaf/spec/index.rdf
  • [ ] http://data.europa.eu/m8g/
  • [ ] http://purl.org/dc/terms/
  • [ ] http://www.w3.org/ns/dcat#
  • [ ] http://www.w3.org/2002/07/owl#
  • [ ] http://www.w3.org/1999/02/22-rdf-syntax-ns#
  • [ ] http://www.w3.org/2000/01/rdf-schema

cristianvasquez avatar Feb 01 '24 14:02 cristianvasquez

There was a discussion about how to reuse the external vocabularies. While I believe that lexical adaptations should be discouraged, I have discovered that this is a practice in the semantic standardisation community, including the ePO working group.

How the lexical adaptations can be implemented is described in the SEMIC style guide: for classes, for properties.

costezki avatar Feb 02 '24 08:02 costezki

Hi, thank you for noticing.

Lexical adaptations are useful indeed. I've relaxed the list of elements to remove, and I'll update the issue description

cristianvasquez avatar Feb 02 '24 09:02 cristianvasquez

One option to implement this is a CONSTRUCT over the dataset that filters out things with Subject from known vocabularies.

This can be applied as post-processing

PREFIX ns1: <http://www.w3.org/2006/time#>
PREFIX ns2: <http://www.w3.org/ns/locn#>
PREFIX ns3: <http://www.w3.org/ns/org#>
PREFIX ns4: <http://www.w3.org/ns/person#>
PREFIX ns5: <http://www.w3.org/ns/adms#>
PREFIX ns6: <http://www.w3.org/2004/02/skos/core#>
PREFIX ns7: <http://www.w3.org/2002/07/owl#>
PREFIX ns8: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ns9: <http://xmlns.com/foaf/spec/index.rdf>
PREFIX ns10: <http://data.europa.eu/m8g/>
PREFIX ns11: <http://purl.org/dc/terms/>
PREFIX ns12: <http://www.w3.org/ns/dcat#>
PREFIX ns13: <http://www.w3.org/2002/07/owl#>
PREFIX ns14: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ns15: <http://www.w3.org/2000/01/rdf-schema#>

CONSTRUCT {
  ?s ?p ?o
}
WHERE {
  GRAPH ?graph {
    ?s ?p ?o
    FILTER (isURI(?s) && 
            !(STRSTARTS(str(?s), str(ns1:)) ||
              STRSTARTS(str(?s), str(ns2:)) ||
              STRSTARTS(str(?s), str(ns3:)) ||
              STRSTARTS(str(?s), str(ns4:)) ||
              STRSTARTS(str(?s), str(ns5:)) ||
              STRSTARTS(str(?s), str(ns6:)) ||
              STRSTARTS(str(?s), str(ns7:)) ||
              STRSTARTS(str(?s), str(ns8:)) ||
              STRSTARTS(str(?s), str(ns9:)) ||
              STRSTARTS(str(?s), str(ns10:)) ||
              STRSTARTS(str(?s), str(ns11:)) ||
              STRSTARTS(str(?s), str(ns12:)) ||
              STRSTARTS(str(?s), str(ns13:)) ||
              STRSTARTS(str(?s), str(ns14:)) ||
              STRSTARTS(str(?s), str(ns15:)))
           )
  }
}

cristianvasquez avatar Jun 10 '24 09:06 cristianvasquez