Label Resolution and Full-Text Search¤
Label resolution translates resource identifiers (URI/IRI) into human readable labels. This resolution, and by extends the full text search is configurable for different scenarios.
eccenca DataPlatform offers three configuration options:
languagePreferences (line 5) and
languagePreferencesAnyLangFallback (line 8).
proxy: labelProperties: # (1) - "http://www.w3.org/2000/01/rdf-schema#label" - "http://www.w3.org/2004/02/skos/core#prefLabel" languagePreferences: #(2) - "en" - "" languagePreferencesAnyLangFallback: true #(3)
These properties define not only which properties and languages should be considered, but also define the precedence of languages and properties over each other.
The retrieval process can simplified to the following procedure:
- First, when determining the label for a resource, the language is evaluated, then the property is considered.
- Consequently, for a resource in the default case:
- An english value for
- A literal without a language tag of the property
rdfs:labelis searched (this is why there is an entry
- An english value of
- A language-less value for
- If nothing is found, DataPlatform tries to create a prefixed URI, otherwise the last segment of the resource identifier is used.
- An english value for
Additionally, in case more than one label could be retrieved, for example by conflicting values, the alphabetically first entry is used.
How labels are resolved is best explained using those default settings and some examples.
:Resource1 rdfs:label "Leipzig"@en. :Resource2 :someOtherProperty "Berlin"@en. :Resource3 rdfs:label "Stuttgart"@de :Resource4 rdfs:label "Hanover"@en :Resource4 rdfs:label "Another Label for Hanover"@en
**:Resource1**the label will be
Leipzig, as it will retrieve the english
**:Resource2 **the label cannot be retrieved from the Knowledge Graph, as no know Property is used. Hence the fallback
- For :Resource3the label will be retrieved as
Stuttgart, if the (3)
- While there is a well-known property used, none of the used languages matches. Using the fallback, the alphabetically first match is retrieved anyways.
:Resource4multiple label candidates could be determined.
- In this case,
Another Label for Hanoveris retrieved, as it is the first value in the alphanumerical comparison.
The label resolution functionality can also be used by client systems, the functionality is exposed as an API endpoint (