dbpedia / extraction-framework

The software used to extract structured data from Wikipedia
850 stars 270 forks source link

Running “Minidumps with RDFUnit/SHACL” test returns error. #625

Open jlareck opened 4 years ago

jlareck commented 4 years ago

“Minidumps with RDFUnit/SHACL” test returns unexpected error.

E.g. we have shapes graph like this:

@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dbr: <http://dbpedia.org/resource/> .
@prefix dbp: <http://dbpedia.org/property/> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

<#%3F_(film)>
    a sh:NodeShape ;
    sh:targetNode <http://books.google.com/books%3Fvid=ISBN978-0-8014-4515-6> ;
​
    sh:property [
        sh:path dbp:location ;
        sh:hasValue "Ithaca" ;
    ] .

Running the “Minidumps with RDFUnit/SHACL” test with given example returns the following error:

- Minidumps with RDFUnit/SHACL *** FAILED ***
  [ShaclTestCaseResultImpl(resultAnnotations=[PropertyValuePair(property=http://www.w3.org/ns/shacl#resultPath, values=[http://dbpedia.org/property/location]), 
PropertyValuePair(property=http://www.w3.org/ns/shacl#sourceConstraintComponent, values=[http://www.w3.org/ns/shacl#HasValueConstraintComponent]),
PropertyValuePair(property=http://www.w3.org/ns/shacl#sourceShape, values=[b4326c0d67404a6b5d32cddd7322097a]),
PropertyValuePair(property=http://www.w3.org/ns/shacl#focusNode, values=[http://books.google.com/books%3Fvid=ISBN978-0-8014-4515-6]),
PropertyValuePair(property=http://www.w3.org/ns/shacl#resultSeverity, values=[http://www.w3.org/ns/shacl#Violation]), 
PropertyValuePair(property=http://www.w3.org/ns/shacl#resultMessage, values=[should have value: {$hasValue}])])] was not empty (MinidumpTests.scala:222)

But citation-data dataset contains extracted triple with parameters described in shapes graph. The extracted triple: <http://books.google.com/books%3Fvid=ISBN978-0-8014-4515-6> <http://dbpedia.org/property/location> "Ithaca" .

And that’s why it have not to return any errors.

github-actions[bot] commented 3 years ago

Branch issue-625-Running_Minidumps_with_RDFUnit/SHACL_test_returns_error created!