OP-TED / ePO

The eProcurement Ontology provides the formal, semantic foundation for the creation and reuse of linked open data in the domain of public procurement in the EU.
European Union Public License 1.2
58 stars 18 forks source link

Eliminate the redefinition of properties of common vocabularies #538

Open cristianvasquez opened 8 months ago

cristianvasquez commented 8 months ago

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:

costezki commented 8 months ago

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.

cristianvasquez commented 8 months ago

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 commented 3 months ago

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:)))
           )
  }
}