Heads Up: proposal deep linking

In discussion at SemTech, particularly with Denny, I think we need to consider extending the context to allow for a combination of deep linking and property folding.

Basically, the WikiData use case would like to represent information such as the following:

{
  "queenie": {
    "@id": "http://buckingham.uk/queenie",
    "label": {
      "en": { "@value": "The Queen" },
      "de": { "@value": "Die Königin"}
    }
}

Two things going on here, one would be to allow for a property to be defined for both "en" and "de" (and other languages) which would have the effect of applying a @context to set the @language for the sub-tree rooted by the property, and remove the extra layer of object/property. In essence, "en" would be defined within a context as something such as {"@id": "null", "@language": "en"}, but with some other suggar that indicated that it was to allow deep linking so that the contents would be  processed, yielding something like the following:

{
  "queenie": {
    "@id": "http://buckingham.uk/queenie",
    "label": [
     { "@value": "The Queen", "@language": "en },
     { "@value": "Die Königin", "@language": "de" }
    ]
}

Of course, this could include other properties as well, that would all be presumed to have the specified language. For their use case, this could be extended to describing video content as being in the specified language, but I'm not sure how or if this would be represented in RDF.

The second thing is the desire to use properties to identify subjects (e.g., "queenie"). Again, this would not actually be turned into semantic entities, but would be convienient for JSON access; it's perfectly okay for the IRI to be repeated in an @id contained within the referenced subject. The property folding/deep linking syntax would also work here. Basically, process the contents and apply to the current subject. However, right now, if "queenie" was unmapped, or mapped to null, the sub-tree would not be processed. This could be done essentially the same as the "en"/"de" case, but not necessarily adding a language.

We could potentially have some @context syntax such as the following:

"@context": {
  "en": {"@id": null", "@language": "en", "@fold": true},
  "de": {"@id": null", "@language": "de", "@fold": true},
  "queenie": {"@id": null", "@fold": true}
}

This wouldn't have to survive expansion, but should probably work with framing, so that you could re-create this structure.

If we can do something like this, then Denny indicated that JSON-LD would be pretty much a perfect match for WikiData.

For some more on the WikiData talk page, look at [1].

Thoughts?

Gregg

[1] http://meta.wikimedia.org/wiki/Talk:Wikidata/Data_model/JSON#How_would_that_be_expressed_in_JSON-LD.3F

Received on Wednesday, 6 June 2012 03:59:38 UTC