dice-group / LIMES

Link Discovery Framework for Metric Spaces.
https://limes.demos.dice-research.org/
GNU Affero General Public License v3.0
126 stars 54 forks source link

Complex query configuration file #277

Closed mchiaraf closed 2 years ago

mchiaraf commented 2 years ago

I have a question about the configuration file. I want to align all the instances of architectural property of my Knowledge Graph with DBpedia instances.
The properties that I need to compare are the name of the building and its location. The problem is that for both (name and location) we don't have a direct data property, but we have n-ary relations, represented as follow:

name ?building dd:hasDesignationInTime ?DesignationInTime . ?DesignationInTime rdfs:label ?name

location ?building loc:hasCulturalPropertyAddress ?Address . ?Address clv:hasCity ?City . ?City rdfs:label ?location

The problem is: if the variable is "building", I don't have direct properties that can be compared with the properties in dbpedia. Do you have any suggestions for properly formatting the configuration file?

Thanks in advance for the great work!

KonradHoeffner commented 2 years ago

I am not a LIMES developer but as far as I know you can use "n-ary relations" (as in multi-hop) using SPARQL 1.1. property syntax.

In your example, such paths could be:

MSherif commented 2 years ago

Yes, exactly as @KonradHoeffner mentioned, you could use propriety paths (https://www.w3.org/TR/sparql11-property-paths/) like the one in the example in the LIMES manual:

<PROPERTY>geom:geometry/geos:asWKT RENAME polygon</PROPERTY>

See the full example config at http://dice-group.github.io/LIMES/#/user_manual/configuration_file/configuration-file-examples?id=configuration-file-examples