Re: ITS 2.0 example in web annotation

Dear all,

coming back to this old thread. 

in the context of the FREME EU project we now have created a service that produces the annotations we discussed in this thread. An example API call is here. Sorry for those wo don’t use curl. It’s a simple HTTP post request.

curl -X POST --header "Content-Type: text/plain" --header "Accept: text/n3" "http://api.freme-project.eu/current/e-entity/freme-ner/documents?input=Welcome%20to%20Marlene%20Dietrich%20and%20Berlin&informat=text&outformat=turtle&language=en&dataset=dbpedia&mode=all&filter=freme-ner-output-as-web-annotation“

We have created a filter that queries (via sparql) the non web annotation output of the service and transforms the result into the web annotation model we discussed here. Comments of course welcome. I have put the two annotations generated below, FYI.

Best,

Felix


[ a       <http://www.w3.org/ns/oa#Annotation> ;
  <http://www.w3.org/ns/oa#hasTarget>
          [ itsrdf:taClassRef    "http://nerd.eurecom.fr/ontology#Person, http://dbpedia.org/ontology/Agent, http://dbpedia.org/ontology/Person" ;
            itsrdf:taConfidence  "0.9719457193919854"^^xsd:double ;
            itsrdf:taIdentRef    dbpedia:Marlene_Dietrich ;
            <http://www.w3.org/ns/oa#hasSelector>
                    [ a                              <http://www.w3.org/ns/oa#TextPositionSelector> ;
                      <http://www.w3.org/ns/oa#end>  "27"^^xsd:int ;
                      <http://www.w3.org/ns/oa#start>
                              "11"^^xsd:int
                    ] ;
            <http://www.w3.org/ns/oa#hasSource>
                    <http://freme-project.eu/#char=11,27>
          ]
] .

[ a       <http://www.w3.org/ns/oa#Annotation> ;
  <http://www.w3.org/ns/oa#hasTarget>
          [ itsrdf:taClassRef    "http://dbpedia.org/ontology/Region, http://dbpedia.org/ontology/Place, http://dbpedia.org/ontology/Location, http://dbpedia.org/ontology/PopulatedPlace, http://nerd.eurecom.fr/ontology#Location, http://dbpedia.org/ontology/AdministrativeRegion" ;
            itsrdf:taConfidence  "0.9145331710065083"^^xsd:double ;
            itsrdf:taIdentRef    dbpedia:Berlin ;
            <http://www.w3.org/ns/oa#hasSelector>
                    [ a                              <http://www.w3.org/ns/oa#TextPositionSelector> ;
                      <http://www.w3.org/ns/oa#end>  "38"^^xsd:int ;
                      <http://www.w3.org/ns/oa#start>
                              "32"^^xsd:int
                    ] ;
            <http://www.w3.org/ns/oa#hasSource>
                    <http://freme-project.eu/#char=32,38>
          ]
] .


> Am 22.11.2015 um 19:57 schrieb Felix Sasaki <fsasaki@w3.org>:
> 
> Looks good to me, thanks a lot for the feedback, Benjamin. I will see if there is further feedback and then re-generate the complete example. 
> 
> Best,
> 
> Felix
> 
>> Am 19.11.2015 um 16:48 schrieb Benjamin Young <bigbluehat@hypothes.is <mailto:bigbluehat@hypothes.is>>:
>> 
>> Hey Felix and Ivan,
>> 
>> I think you'd still want to provide some sort of content for the `body` to a "typical" annotation system that might find your annotation, so that it could at least display something.
>> 
>> So...maybe...
>> ```
>> {
>>   ....
>>   "body": {
>>     "motivation": "tagging",
>>     "content": "translate"
>>     "itsrdf:*": ... etc...
>>   }
>> }
>> ```
>> 
>> However, I still feel like these `itsrdf` properties are in the wrong place and should be attached to the target. Since `body` is optional anyhow (and annotation systems which don't find bodies would likely just ignore them...unless they wanted them), you'd end up with something like this (see below Felix's example...as it's a revision...):
>> 
>> 
>> On Thu, Nov 19, 2015 at 3:06 AM, Felix Sasaki <fsasaki@w3.org <mailto:fsasaki@w3.org>> wrote:
>> Thank you for the feedback, Ivan. Would it help to add e.g. a motivation, e.g. see below:
>> 
>> {
>> "@id": "http://example.com/myannotations/a1 <http://example.com/myannotations/a1>",
>> "@type": "Annotation",
>> "target": {
>> "source": "http://example.com/myfile.xml <http://example.com/myfile.xml>",
>> "selector": {
>> "@type": "FragmentSelector",
>> "conformsTo": "http://www.w3.org/TR/xpath/ <http://www.w3.org/TR/xpath/>",
>> "value": "/itsProcessingInput"
>> }
>> },
>> "body": {
>> "motivation": "tagging",
>> "itsrdf:translate": "yes",
>> "itsrdf:dir": "ltr",
>> "itsrdf:withinText": "no",
>> "itsrdf:term": "no",
>> "itsrdf:localeFilterList": "*",
>> "itsrdf:localeFilterType": "included"
>> }
>> }
>> 
>> ```
>> {
>>   "id": "http://example.com/myannotations/a1 <http://example.com/myannotations/a1>",
>>   "type": "Annotation",
>>   "target": {
>>     "type": "SpecificResource",
>>     "source": "http://example.com/myfile.xml <http://example.com/myfile.xml>",
>>     "selector": {
>>       "type": "FragmentSelector",
>>       "conformsTo": "http://www.w3.org/TR/xpath/ <http://www.w3.org/TR/xpath/>",
>>       "value": "/itsProcessingInput"
>>     },
>>     "itsrdf:translate": "yes",
>>     "itsrdf:dir": "ltr",
>>     "itsrdf:withinText": "no",
>>     "itsrdf:term": "no",
>>     "itsrdf:localeFilterList": "*",
>>     "itsrdf:localeFilterType": "included"
>>   }
>> }
>> ```
>> 
>> Here's the "bodies are optional" bit:
>> "There SHOULD be 1 or more body relationships or properties associated with an Annotation but there MAY be 0."
>> http://w3c.github.io/web-annotation/model/wd/#model <http://w3c.github.io/web-annotation/model/wd/#model>
>> 
>> This variation of the example ITS + Web Annotation seems to say the right things.
>> 
>> Here's what it looks like on the JSON-LD Playground:
>> http://json-ld.org/playground/#/gist/b7dbd89e5e50cbb2aff1 <http://json-ld.org/playground/#/gist/b7dbd89e5e50cbb2aff1>
>> 
>> And in n-quads:
>> <http://example.com/myannotations/a1 <http://example.com/myannotations/a1>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>> <http://www.w3.org/ns/oa#Annotation <http://www.w3.org/ns/oa#Annotation>> .
>> <http://example.com/myannotations/a1 <http://example.com/myannotations/a1>> <http://www.w3.org/ns/oa#hasTarget <http://www.w3.org/ns/oa#hasTarget>> _:b0 .
>> _:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>> <http://json-ld.org/playground/SpecificResource <http://json-ld.org/playground/SpecificResource>> .
>> _:b0 <http://www.w3.org/ns/oa#hasSelector <http://www.w3.org/ns/oa#hasSelector>> _:b1 .
>> _:b0 <http://www.w3.org/ns/oa#hasSource <http://www.w3.org/ns/oa#hasSource>> <http://example.com/myfile.xml <http://example.com/myfile.xml>> .
>> _:b0 <itsrdf:dir> "ltr" .
>> _:b0 <itsrdf:localeFilterList> "*" .
>> _:b0 <itsrdf:localeFilterType> "included" .
>> _:b0 <itsrdf:term> "no" .
>> _:b0 <itsrdf:translate> "yes" .
>> _:b0 <itsrdf:withinText> "no" .
>> _:b1 <http://purl.org/dc/terms/conformsTo <http://purl.org/dc/terms/conformsTo>> <http://www.w3.org/TR/xpath/ <http://www.w3.org/TR/xpath/>> .
>> _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>> <http://www.w3.org/ns/oa#FragmentSelector <http://www.w3.org/ns/oa#FragmentSelector>> .
>> _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#value <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>> "/itsProcessingInput" .
>> 
>> 
>> ...that's easier to read in the playground...sorry it's not in Turtle.
>> 
>> From what I understand, this makes "more correct" statements about the SpecificResource vs. a body related to the SpecificResource.
>> 
>> Does that look correct?
>> 
>> Thanks!
>> Benjamin
>> --
>> Developer Advocate
>> http://hypothes.is/ <http://hypothes.is/>
>>  
>> 
>> 
>> „tagging“ could be seen as subsuming all ITS related annotations.
>> 
>> - Felix
>> 
>> 
>>> Am 19.11.2015 um 06:30 schrieb Ivan Herman <ivan@w3.org <mailto:ivan@w3.org>>:
>>> 
>>> Felix, others,
>>> 
>>> I just try to locate where the problem might be when combining it with the annotation model…
>>> 
>>> The json file, whether seen as pure JSON  (JSON-LD) is technically correct. However, if the annotation gets into a special annotation system, that may find itself in an edge case: indeed, the body of the annotation does not use any of the properties that are defined in the annotation model. We would have to check whether there is any constraints defined in the model whereby certain things must be present ('content', etc). But systems might still fall over on such edge cases… Benjamin, Paolo, what would your annotation server do?
>>> 
>>> Thanks
>>> 
>>> Ivan
>>> 
>>> 
>>>> On 12 Nov 2015, at 19:52, Felix Sasaki <fsasaki@w3.org <mailto:fsasaki@w3.org>> wrote:
>>>> 
>>>> Following the meeting at TPAC and the discussion we had recently on this list, I created an example of how a set of ITS 2.0 information stored following the web annotation data model could look like:
>>>> 
>>>> 1) Counterpart of web annotation: storage of ITS information as markup in the XML document itself (note that the annotated document is an XML document):
>>>> https://github.com/w3c/itsrdf/blob/master/its-in-markup.xml <https://github.com/w3c/itsrdf/blob/master/its-in-markup.xml>
>>>> 2) Storage using the web annotation model:
>>>> https://github.com/w3c/itsrdf/blob/master/its-via-web-annotation.json <https://github.com/w3c/itsrdf/blob/master/its-via-web-annotation.json>
>>>> (I decided to use the FragmentSelector)
>>>> 
>>>> Feedback of course more than welcome. 
>>>> 
>>>> - Felix
>>> 
>>> 
>>> ----
>>> Ivan Herman, W3C 
>>> Digital Publishing Lead
>>> Home: http://www.w3.org/People/Ivan/ <http://www.w3.org/People/Ivan/>
>>> mobile: +31-641044153 <tel:%2B31-641044153>
>>> ORCID ID: http://orcid.org/0000-0003-0782-2704 <http://orcid.org/0000-0003-0782-2704>

Received on Thursday, 14 April 2016 14:40:27 UTC