Testováno nad částí dat z ISVZUSu, připraveno na prezentaci.
URL Prefixes
Label properties
Pipelines
DN rules
{ ?s ?pxsd:float(bif:replace(bif:replace(?o, ' ', ''), ',', '.'))
}
WHERE {
?s ?p ?o.
FILTER (?p = <http://purl.org/goodrelations/v1#hasCurrencyValue>)
FILTER REGEX(?o, '^[0-9][0-9 ][.,]?[0-9]$')
}
add rule component
{ ?s ?p ?o }
WHERE {
?s ?p ?o.
FILTER (?p = <http://purl.org/goodrelations/v1#hasCurrencyValue>)
FILTER REGEX(?o, '^[0-9][0-9 ][.,]?[0-9]$')
FILTER (datatype(?o) != xsd:float)
}
add a new rule
{ ?s ?pxsd:integer(?o)
}
WHERE {
?s ?p ?o.
FILTER(?p = <http://purl.org/business-register#officialNumber>)
FILTER (!bif:isnull(xsd:integer(?o)))
}
{ ?s ?p ?o }
WHERE {
?s ?p ?o.
FILTER(?p = <http://purl.org/business-register#officialNumber>)
FILTER (!bif:isnull(xsd:integer(?o)) && datatype(?o) != xsd:integer)
}
Pipelines
QA rules
{ ?s vcard2006:email ?mail. FILTER(!regex(?mail, "^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$", "i")) }
{?s <http://purl.org/procurement/public-contracts#publicationDate> ?p.
?s <http://purl.org/procurement/public-contracts#tenderDeadline> ?d.
FILTER (bif:datediff('day', xsd:date(?p), xsd:date(?d)) < 1)}
{ ?s gr:hasCurrencyValue ?price. FILTER(!regex(?price, "^[0-9 ]*([.,][0-9]+)?$", "i")) }
Pipelines
OI rules
<LinkageRule>
<Compare weight="1" threshold="1.0" required="true" metric="equality">
<Input path="?a/<http://purl.org/business-register#officialNumber>"></Input>
<Input path="?b/<http://purl.org/business-register#officialNumber>"></Input>
</Compare>
</LinkageRule>
<LinkageRule>
<Aggregate type="min">
<Compare weight="1" threshold="1.0" required="true" metric="equality">
<Input path="?a/vcard2006:email"></Input>
<Input path="?b/vcard2006:email"></Input>
</Compare>
<Compare weight="1" threshold="1.0" required="true" metric="equality">
<Input path="?a/vcard2006:name"></Input>
<Input path="?b/vcard2006:name"></Input>
</Compare>
</Aggregate>
</LinkageRule>
Pipelines