Re: Attempting to re-contextualize Hypothes.is JSON

Apologies if this falls under "looses data" but, how are the tags
associated with the target?

Wouldn't you have to have something like:

"text": [ "As featured in \"Weaving the Web\" by Tim Berners-Lee", "tags":
[ "web", "history" ]],


_____________________________________________________
Jacob Jett
Research Assistant
Center for Informatics Research in Science and Scholarship
The Graduate School of Library and Information Science
University of Illinois at Urbana-Champaign
501 E. Daniel Street, MC-493, Champaign, IL 61820-6211 USA
(217) 244-2164
jjett2@illinois.edu

On Wed, Jul 22, 2015 at 4:21 PM, Benjamin Young <bigbluehat@hypothes.is>
wrote:

> I'm in the process of wrangling Hypothes.is (and Annotator) JSON data into
> Web Annotation Data Model compliant JSON-LD.
>
> One such attempt I've started, is to craft a custom @context which takes
> the JSON output from the Hypothesis API and maps those keys and values into
> a valid Web Annotation.
>
> My core objective at the moment is to see how far I can get with "merely"
> providing a custom context definition and *without* editing any of the JSON
> itself.
>
>
> Here's what I have so far:
> ..on the JSON-LD playground...
> http://json-ld.org/playground/#/gist/5b3a8a89bea268ee7343
>
> ...and as a GitHub Gist--where you can fork, comment, etc....
> https://gist.github.com/BigBlueHat/cd7cfcddecd1dce5f32f
>
> There's a good bit of ambiguity, selector type's don't "upgrade", there's
> not a "RangeSelector" type (so the partial XPath's used by Annotator get
> lost), and obviously there's a bunch of blank nodes to care about. :-/
>
> These are the variations I've made to the WD's context definition:
> Added:
>  - "@base": "http://hypothes.is/api/annotations/"
>  - "id": "@id"
>  - "tags": "oa:Tag"
> Changed:
>  - annotatedAt to created
>  - serializedAt to updated
>  - body to text
>  - annotatedBy to user
>
> (I think that's all of them)
>
> I'm actually quite happy with how far it got. :) However, it's obviously
> incomplete, looses data, and other not so great things...
>
> I'd be curious to know if there are ways to do this correctly (using just
> a custom context with *no* data modifications) or if this is a fool's
> errand.
>
> If it's possible, then I can "upgrade" all the Hypothesis annotations to
> Web Annotation Data Model JSON-LD with the addition of one file and one URL
> to the payload--which would be a great developer story for folks wanting to
> implement the data model.
>
> If it's impossible (or will require data modification), than...there's
> more work to be done.
>
> My personal interest is to measure the distance from this "JSON in the
> wild" (though obviously informed by the data model as it is...) and fully
> compliant Web Annotation Data Model format.
>
> If I can build the bridge...I figure I can teach others to too. ^_^
>
> Cheers!
> Benjamin
> --
> Developer Advocate
> http://hypothes.is/
>

Received on Wednesday, 22 July 2015 21:37:17 UTC