W3C home > Mailing lists > Public > public-linked-json@w3.org > September 2016

Language Maps and default language

From: Robert Sanderson <azaroth42@gmail.com>
Date: Mon, 19 Sep 2016 11:38:14 -0700
Message-ID: <CABevsUF02ZXvGgHYhNKCAfQpHSxfXP+1azebDKOrSTyaSXNjJA@mail.gmail.com>
To: Linked JSON <public-linked-json@w3.org>
Cc: Vladimir Alexiev <vladimir.alexiev@ontotext.com>
Dear all,

I'd love some clarification around the expected behavior of language maps
with a default language.

For example, in a context, one might use:
  "label" : {"@id": "rdfs:label", "@container": "@language", "@language":
"en"}

I would expect this to then add a language of "en" to any string that does
not have a language set.  And indeed this works in the playground:
    http://tinyurl.com/zn9jxkz

However, when loading the data from NQuads, this does not work:

_:b0 <http://www.w3.org/2000/01/rdf-schema#label> "bar" .
_:b0 <http://www.w3.org/2000/01/rdf-schema#label> "fish" .

results in

{'@context': {
    'label': {'@container': '@language', '@id': 'rdfs:label', '@language':
'en'},
    'rdfs': 'http://www.w3.org/2000/01/rdf-schema#'
  },
  '@id': '_:b0',
  'rdfs:label': ['bar', 'fish']
}

rather than using the label key and assigning the default language of "en".

I would expect, per the playground:

{
  "@context": {
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "label": {"@id": "rdfs:label", "@container": "@language", "@language":
"en"}
  },
  "label": {
    "en": [ "fish", "bar" ]
  }
}


Thanks in advance for any thoughts.

Rob

-- 
Rob Sanderson
Semantic Architect
The Getty Trust
Los Angeles, CA 90049
Received on Monday, 19 September 2016 18:38:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:48 UTC