Re: Attempting to re-contextualize Hypothes.is JSON

On Wed, Jul 22, 2015 at 5:36 PM, Jacob Jett <jjett2@illinois.edu> wrote:

> 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" ]],
>

Yeah...at the moment, the `tags` in Hypothes.is are ambiguous. It's not
clear (in the UI or the JSON) which they're for, the comment (most likely)
or the resource (less likely).

If you tried the JSON-LD playground, they end up being about the
comment--which seems OK at this point.

If/when Hypothes.is adds resource tagging, then we'll certainly try to put
it in the right place. ;)

Curious if you thought the graph output looked correct.

Thanks for the thought, Jacob!
Benjamin
--
Developer Advocate
http://hypothes.is/



>
>
> _____________________________________________________
> 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 Thursday, 23 July 2015 20:20:56 UTC