odalic / sti

An API and enhancements to the Semantic Table Interpretation
Other
3 stars 0 forks source link

find attributes faster - get labels in one query #476

Closed josef-janousek closed 7 years ago

josef-janousek commented 7 years ago

The problem is that there are separate queries for getting label for each predicate/object of a resource in target KB, which means hundreds of queries for one disambiguation candidate.

tomas-knap commented 7 years ago

Query used: SELECT DISTINCT ?predicate ?predicateLabel ?object ?objectLabel { http://dbpedia.org/resource/Graz ?predicate ?object.

OPTIONAL { ?predicate ?pLabelPred ?predicateLabel. VALUES ?pLabelPred {rdfs:label foaf:name}. FILTER langMatches (lang(?predicateLabel), "en"). }.

OPTIONAL { ?object ?oLabelPred ?objectLabel. VALUES ?oLabelPred {rdfs:label foaf:name}. FILTER langMatches (lang(?objectLabel), "en"). }. }

tomas-knap commented 7 years ago

@josef-janousek, I tried, it is much more faster.