Skip to content

Instantly share code, notes, and snippets.

@mingan
Last active August 29, 2015 14:00
Show Gist options
  • Save mingan/11344747 to your computer and use it in GitHub Desktop.
Save mingan/11344747 to your computer and use it in GitHub Desktop.
<Aggregate type="min" required="true">
<Compare metric="inequality" required="false">
<Input path="?a" />
<Input path="?b" />
</Compare>
<Aggregate type="average">
<Compare metric="equality" required="true">
<TransformInput function="lowerCase">
<TransformInput function="removeSpecialChars">
<Input path="?a/gr:legalName"/>
</TransformInput>
</TransformInput>
<TransformInput function="lowerCase">
<TransformInput function="removeSpecialChars">
<Input path="?b/gr:legalName"/>
</TransformInput>
</TransformInput>
</Compare>
<Compare metric="wgs84" required="true" threshold="2">
<Input path="?a/schema:address/schema:geo/wgs84:geometry" />
<Input path="?b/schema:address/schema:geo/wgs84:geometry" />
<Param name="unit" value="km"/>
</Compare>
</Aggregate>
</Aggregate>
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix e: <http://example.com/> .
@prefix wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix schema: <http://schema.org/> .
e:e1 gr:legalName "abcd" ;
a gr:BusinessEntity ;
schema:address e:e1a .
e:e1a schema:geo e:e1ag .
e:e1ag wgs84:geometry "50.0839201 14.4415697" .
e:e2 gr:legalName "abcd" ;
a gr:BusinessEntity ;
schema:address e:e2a .
e:e2a schema:geo e:e2ag .
e:e2ag wgs84:geometry "50.089617 14.4130565" .
e:e3 gr:legalName "abcd" ;
a gr:BusinessEntity ;
schema:address e:e3a .
e:e3a schema:geo e:e3ag .
e:e3ag wgs84:geometry "50.0957209 14.3857314" .
e:e4 gr:legalName "abcd" ;
a gr:BusinessEntity ;
schema:address e:e4a .
e:e4a schema:geo e:e4ag .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment