-
Notifications
You must be signed in to change notification settings - Fork 30
Language processing in Linked Data authorities
Some linked data authorites tag literals with a language (e.g. 'milk@en', 'Milch@de', 'Lait@fr'). When this literals are tagged, it is desirable to be able to request literals for a specific language for two reasons: 1) provide users terms in their desired language, 2) avoid long results that include the term in every language. This document describes language processing for the linked data module in QA.
Language can be specified in multiple places. They are listed here in priority order with highest priority first. If the language is not specified at a higher priority location, then the next highest language specification that does exist will be used.
- Passed as part of the request URL
- Defined in the authority configuration
- Sitewide preferred language
In general, when a language is specified, literals will be returned if the literal is not tagged (e.g. 'milk') or if the literal matches the language
Examples:
['milk@en', 'Milch@de', 'lait@fr'] requesting 'de' will return only ['Milch@de']
['milk', 'Milch@de', 'lait@fr'] requesting 'de' will return only ['Milch@de', 'milk']
['milk@en', 'Milch@de', 'lait@fr'] requesting ['fr','de'] will return only ['Milch@de', 'lait@fr']
Example: The following example searches the cached Agrovoc vocabulary in French and receives back results in French.
[{"uri":"http://aims.fao.org/aos/agrovoc/c_1a3a6e9a","id":"http://aims.fao.org/aos/agrovoc/c_1a3a6e9a","label":"lait d'avoine"},
{"uri":"http://aims.fao.org/aos/agrovoc/c_54e9f6e0","id":"http://aims.fao.org/aos/agrovoc/c_54e9f6e0","label":"lait d'amande"},
{"uri":"http://aims.fao.org/aos/agrovoc/c_16076","id":"http://aims.fao.org/aos/agrovoc/c_16076","label":"Lait de bufflesse"},
{"uri":"http://aims.fao.org/aos/agrovoc/c_4826","id":"http://aims.fao.org/aos/agrovoc/c_4826","label":"Lait"}]
NOTES:
- The search term (e.g.
q=lait
) is in the specified language (e.g.lang=fr
). Support for this is determined by the authority. - The authority must be configured to process the
lang
parameter so that it can pass it on to the external authority. - The external authority must support a language parameter (e.g.
lang
) as part of its access API. - This parameter can be applied to
search
andterm
requests based on configuration
TODO... Add config of lang param
TODO
TODO
Some authorities do not tag languages or tag in a way that they are not sufficiently useful for filtering results. In those cases, you can turn off language processing.
TODO
ß TODO
Using Questioning Authority
- Connecting to Discogs
- Connecting to GeoNames
- Connecting to Getty
- Connecting to Library of Congress (LOC)
- Connecting to Medical Subject Headings (MeSH)
- Connecting to OCLC FAST
Custom Controlled Vocabularies
Linked Data Access to Authorities
- Connecting to Linked Data authorities
- Using the Linked Data module to access authorities
- Configuring access to a Linked Data authority
- Language processing in Linked Data authorities
Contributing to Questioning Authority
- Contributing a new external authority
- Template for authority documentation
- Understanding Existing Authorities