Difference between revisions of "Annotating"
Jump to navigation
Jump to search
Susanna Ånäs (talk | contribs) (Created page with "We investigate the idea of adding links to Wikipedia articles, either to red links of plain text. The annotations should follow a standard format, the collected data should m...") |
Susanna Ånäs (talk | contribs) (→Selectors) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
The annotations should follow a standard format, the collected data should match. | The annotations should follow a standard format, the collected data should match. | ||
− | + | ==Selectors in Web Annotation Data Model== | |
− | |||
− | |||
− | |||
− | |||
− | ==Selectors== | ||
===Xpath=== | ===Xpath=== | ||
− | + | <pre> | |
− | + | { | |
− | + | "@context": "http://www.w3.org/ns/anno.jsonld", | |
+ | "id": "http://example.org/anno22", | ||
+ | "type": "Annotation", | ||
+ | "body": "http://example.org/note1", | ||
+ | "target": { | ||
+ | "source": "http://example.org/page1.html", | ||
+ | "selector": { | ||
+ | "type": "XPathSelector", | ||
+ | "value": "/html/body/p[2]/table/tr[2]/td[3]/span" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
===CSS selector=== | ===CSS selector=== | ||
+ | <pre> | ||
+ | { | ||
+ | "@context": "http://www.w3.org/ns/anno.jsonld", | ||
+ | "id": "http://example.org/anno21", | ||
+ | "type": "Annotation", | ||
+ | "body": "http://example.org/note1", | ||
+ | "target": { | ||
+ | "source": "http://example.org/page1.html", | ||
+ | "selector": { | ||
+ | "type": "CssSelector", | ||
+ | "value": "#elemid > .elemclass + p" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </pre> | ||
===Text Quote Selector=== | ===Text Quote Selector=== | ||
− | <pre>"selector": { | + | <pre>{ |
− | + | "@context": "http://www.w3.org/ns/anno.jsonld", | |
− | + | "id": "http://example.org/anno23", | |
− | + | "type": "Annotation", | |
− | + | "body": "http://example.org/comment1", | |
+ | "target": { | ||
+ | "source": "http://example.org/page1", | ||
+ | "selector": { | ||
+ | "type": "TextQuoteSelector", | ||
+ | "exact": "anotation", | ||
+ | "prefix": "this is an ", | ||
+ | "suffix": " that has some" | ||
+ | } | ||
+ | } | ||
+ | } | ||
</pre> | </pre> | ||
Latest revision as of 17:58, 22 December 2018
We investigate the idea of adding links to Wikipedia articles, either to red links of plain text.
The annotations should follow a standard format, the collected data should match.
Contents
Selectors in Web Annotation Data Model
Xpath
{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno22", "type": "Annotation", "body": "http://example.org/note1", "target": { "source": "http://example.org/page1.html", "selector": { "type": "XPathSelector", "value": "/html/body/p[2]/table/tr[2]/td[3]/span" } } }
CSS selector
{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno21", "type": "Annotation", "body": "http://example.org/note1", "target": { "source": "http://example.org/page1.html", "selector": { "type": "CssSelector", "value": "#elemid > .elemclass + p" } } }
Text Quote Selector
{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno23", "type": "Annotation", "body": "http://example.org/comment1", "target": { "source": "http://example.org/page1", "selector": { "type": "TextQuoteSelector", "exact": "anotation", "prefix": "this is an ", "suffix": " that has some" } } }
TextPositionSelector
{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno24", "type": "Annotation", "body": "http://example.org/review1", "target": { "source": "http://example.org/ebook1", "selector": { "type": "TextPositionSelector", "start": 412, "end": 795 } } }