Re: [web-annotation] Language Literals not supported within the Body

> On 8 Feb 2016, at 15:41, Hugo Manguinhas <notifications@github.com> 
wrote:
> 
> At the moment, the only way to express the language of the text used
 as body of the annotation, is to create a Textual Body with a 
dc:language property referring to the language. There is also no way 
to add a language to a String Body (see 3.2.2.3).
> 
> A proposal would be to define oa:bodyText and oa:text as Language 
Literals according to the RDF spec, allowing for the Literal to be 
explicitly annotated with the language.
> 
> Pros:
> 
> In line with the common practice for RDF.
> allow for text in multiple languages.
> the language becomes explicit and not implicit in the model.
> Cons:
> 
> an indirection (in JSON-LD) is needed for the text value and 
language.
> Example 1: a case with a String Body tagged with language "en":
> 
> {
>   "motivation": "commenting",
>   "bodyText": { "@value": "my useful comment", "@language": "en" },
>   "target": "http://..."
> }
> Example 2: A Textual Body with a text written in English. In this 
situation, there was no need to create the Textual Body, only if for 
example a role was needed.
> 
> {
>   "motivation": "commenting",
>   "body": {
>     "@type": "TextualBody",
>     "text": { "@value": "my useful comment", "@language": "en" }
>   },
>   "target": "http://..."
> }


Actually, both examples are valid in JSON-LD as is, provided that the 
@context defines "bodyText" and "text" as a property whose value is a 
literal (which is the case). Ain't particularly pretty (and users are 
probably better advised to allow for language setting in their own 
@context if the language setting is overall). 

Really the only question is whether we introduce JSON friendly 
abbreviations for @value and @language. But, because that type of 
usage is really only important for very RDF centric applications, I am
 not sure it is worth doing it. As I said, it just works as is.

Ivan



-- 
GitHub Notification of comment by iherman
Please view or discuss this issue at 
https://github.com/w3c/web-annotation/issues/149#issuecomment-181423907
 using your GitHub account

Received on Monday, 8 February 2016 15:25:54 UTC