-
-
Save jindrichmynarz/eebdc38140ae3ca2744505d10f948fb0 to your computer and use it in GitHub Desktop.
Silk linkage rule with compact IRIs in RestrictTo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<Silk> | |
<Prefixes> | |
<Prefix id="dcterms" namespace="http://purl.org/dc/terms/"/> | |
<Prefix id="owl" namespace="http://www.w3.org/2002/07/owl#"/> | |
<Prefix id="rdf" namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> | |
<Prefix id="rdfs" namespace="http://www.w3.org/2000/01/rdf-schema#"/> | |
<Prefix id="rov" namespace="http://www.w3.org/ns/regorg#"/> | |
<Prefix id="schema" namespace="http://schema.org/"/> | |
<Prefix id="skos" namespace="http://www.w3.org/2004/02/skos/core#"/> | |
</Prefixes> | |
<DataSources> | |
<Dataset id="VVZ" type="sparqlEndpoint"> | |
<Param name="pageSize" value="1000"/> | |
<Param name="clearGraphBeforeExecution" value="false"/> | |
<Param name="pauseTime" value="0"/> | |
<Param name="retryCount" value="3"/> | |
<Param name="endpointURI" value="http://localhost:8890/sparql"/> | |
<Param name="strategy" value="subQuery"/> | |
<Param name="retryPause" value="1000"/> | |
<Param name="graph" value="http://linked.opendata.cz/resource/dataset/isvz.cz"/> | |
<Param name="queryParameters" value=""/> | |
<Param name="login" value=""/> | |
<Param name="useOrderBy" value="true"/> | |
<Param name="entityList" value=""/> | |
<Param name="password" value=""/> | |
</Dataset> | |
</DataSources> | |
<Interlinks> | |
<Interlink id="LinkInvalidIco"> | |
<SourceDataset dataSource="VVZ" var="a" typeUri="http://schema.org/Organization"> | |
<RestrictTo> | |
?a rov:registration ?registration . | |
?registration dcterms:valid false . | |
</RestrictTo> | |
</SourceDataset> | |
<TargetDataset dataSource="VVZ" var="b" typeUri="http://schema.org/Organization"> | |
<RestrictTo> | |
?b rov:registration ?registration . | |
?registration skos:inScheme <http://linked.opendata.cz/resource/concept-scheme/CZ-ICO> . | |
</RestrictTo> | |
</TargetDataset> | |
<LinkageRule linkType="owl:sameAs"> | |
<Aggregate id="average1" required="false" weight="1" type="average"> | |
<Compare id="levenshteinDistance1" required="true" weight="3" metric="levenshteinDistance" threshold="1.0" indexing="true"> | |
<Input id="sourcePath1" path="/rov:registration/skos:notation"/> | |
<Input id="targetPath1" path="/rov:registration/skos:notation"/> | |
<Param name="minChar" value="0"/> | |
<Param name="maxChar" value="9"/> | |
</Compare> | |
<Compare id="jaroWinkler" required="true" weight="1" metric="jaroWinkler" threshold="0.2" indexing="true"> | |
<TransformInput id="alphaReduce1" function="alphaReduce"> | |
<TransformInput id="lowerCase1" function="lowerCase"> | |
<Input id="sourcePath2" path="schema:legalName"/> | |
</TransformInput> | |
</TransformInput> | |
<TransformInput id="alphaReduce2" function="alphaReduce"> | |
<TransformInput id="lowerCase" function="lowerCase"> | |
<Input id="targetPath2" path="schema:legalName"/> | |
</TransformInput> | |
</TransformInput> | |
</Compare> | |
</Aggregate> | |
<Filter limit="1"/> | |
</LinkageRule> | |
<Outputs> | |
<Output id="invalid_ico_links"/> | |
</Outputs> | |
</Interlink> | |
</Interlinks> | |
<Outputs> | |
<Dataset id="invalid_ico_links" type="file"> | |
<Param name="file" value="invalid_ico_plus_legal_name_vvz.nt"/> | |
<Param name="format" value="N-Triples"/> | |
</Dataset> | |
</Outputs> | |
</Silk> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment