Closed fkleedorfer closed 6 months ago
So far, the original triples have not be removed, so there may be duplicates.
I just noticed that this is based on the release data, not the latest state of the main branch. Will fix that asap
EDIT: fixed it
@steveraysteveray how do you want to remove the original triples?
a) I can generate a list of triples to be deleted b) I can write an update query that deletes the triples
Or maybe you have another way using your RDF IDE?
An update query would be great. Thanks for your help.
By the way, we quickly did a test query on your files as follows. It seems to work fine. We first checked that every xsd:double conversionMultiplier indeed had an xsd:decimal equivalent. Please go ahead and do the cleanups using your preferred approach.
DELETE {?u qudt:conversionMultiplier ?m .}
WHERE {
?u a qudt:Unit .
?u qudt:conversionMultiplier ?m .
BIND (DATATYPE(?m) AS ?mT) .
FILTER (?mT = xsd:double) .
}
Here are the queries for deleting the spurious properties:
https://gist.github.com/fkleedorfer/90d8b2b0720f3154bfc367b06e422e65
... to be applied before adding the triples in the PR
I'll see if I can adapt the SHACL constraint that checks them for equality from #821
Great! In the end I used variants of the following query to do the cleanup (Note the various commented-out lines). It can also be used with a FILTER != line to test for equality. We found that the SPARQL engine in TopBraid doesn't look any deeper than 16 digits when comparing an xsd:double to an xsd:decimal.
#SELECT (COUNT (DISTINCT ?u) AS ?count)
#DELETE {?u qudt:standardUncertainty ?m .}
SELECT *
WHERE {
?u a qudt:ConstantValue .
#?u qudt:standardUncertainty ?m .
#BIND (DATATYPE(?m) AS ?mT) .
#FILTER (?mT = xsd:double) .
?u qudt:standardUncertainty ?n .
BIND (DATATYPE(?n) AS ?nT) .
FILTER (?nT = xsd:decimal) .
?u qudt:standardUncertaintySN ?s .
BIND (DATATYPE(?s) AS ?sT) .
}
This allows for using scientific notation, which provides a better developer experience. Equivalence between the values should be checked via SHACL constraints.
qudt:Unit
individuals:qudt:ConstantValue
individuals: