Re: Language maps and undefined language

Rob, perhaps you could create an issue for this.

In CSVW, we coined “und” as the undefined/absent language. Perhaps this (or something similar) would be a way to address this. To be fair {“@value”: “foo”, “@language”: “und”} should probably also work and perhaps just expand to {“@value”: “foo”}.

Gregg Kellogg
gregg@greggkellogg.net

> On Apr 10, 2017, at 9:45 AM, Robert Sanderson <azaroth42@gmail.com> wrote:
> 
> 
> All,
> 
> As work progresses towards 1.1, is there interest in the issue described in this thread:
>     https://lists.w3.org/Archives/Public/public-linked-json/2016Sep/0007.html <https://lists.w3.org/Archives/Public/public-linked-json/2016Sep/0007.html>
> 
> To recap:
> 
> If a string is associated with a property defined as a languageMap, but does not have a language associated with it, it creates two keys in the JSON ... the langStrings go in one, and the non-langStrings in another. This is unintuitive and exposes some of the weirdest weirdness of RDF (langStrings) to unsuspecting JSON developers.  
> 
> 
> A proposal to discuss:
> 
> If compaction would result in an attempt to add a string without an associated language into a LanguageMap, then the processor SHOULD assign the undefined language code `UND` as the key in the array.
> 
> Thus,
> _:x rdfs:label "Fish"@en, "Poisson"@fr, "51234" .
> 
> Would result in:
> 
> {
>   "@id": "_:x",
>   "label": {"en": "Fish", "fr": "Poisson", "UND": "51234"}
> }  
> 
> Rather than the current compaction result:
> 
> {
>   "@id": "_:x",
>   "label": {"en": "Fish", "fr": "Poisson"},
>   "rdfs:label": "51234"
> } 
> 
> 
> Notes:
> 
> * PHP does not support "" as a key in a dictionary, and thus UND as the key
> * This does not propose an inverse expansion rule, in case someone has an explicit @UND langString [seems unlikely], where it should not become a regular xsd:string
> 
> 
> References:
> 
>   https://github.com/digitalbazaar/jsonld.js/issues/151 <https://github.com/digitalbazaar/jsonld.js/issues/151>
>   https://github.com/IIIF/iiif.io/issues/755 <https://github.com/IIIF/iiif.io/issues/755>
> 
> 
> Thoughts?
> 
> Rob
> 
> -- 
> Rob Sanderson
> Semantic Architect
> The Getty Trust
> Los Angeles, CA 90049

Received on Tuesday, 11 April 2017 05:31:52 UTC