-
Notifications
You must be signed in to change notification settings - Fork 0
/
annotation.ttl
116 lines (100 loc) · 2.68 KB
/
annotation.ttl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
@prefix xrr: <http://i3s.unice.fr/xr2rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix dce: <http://purl.org/dc/elements/1.1/>.
@prefix dct: <http://purl.org/dc/terms/>.
@prefix fabio: <http://purl.org/spar/fabio/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix frbr: <http://purl.org/vocab/frbr/core#>.
@prefix oa: <http://www.w3.org/ns/oa#>.
@prefix prov: <http://www.w3.org/ns/prov#>.
@prefix schema: <http://schema.org/>.
@prefix ncbi: <http://identifiers.org/taxonomy/> .
@prefix issap: <http://ns.inria.fr/issa/property/> .
<#Selector>
xrr:logicalSource [
xrr:query """db.Entities.find()""";
];
rr:subjectMap [
rr:template "SelectorBlankNode{$._id}" ;
rr:termType rr:BlankNode;
rr:class oa:TextPositionSelector;
rr:class oa:TextQuoteSelector;
];
rr:predicateObjectMap [
rr:predicate oa:exact;
rr:objectMap [
xrr:reference "$.surface_form";
rr:termType rr:Literal;
rr:datatype xsd:string;
];
];
rr:predicateObjectMap [
rr:predicate oa:start;
rr:objectMap [
xrr:reference "$.start_offset";
rr:termType rr:Literal;
rr:datatype xsd:integer;
];
];
rr:predicateObjectMap [
rr:predicate oa:end;
rr:objectMap [
xrr:reference "$.end_offset";
rr:termType rr:Literal;
rr:datatype xsd:integer;
];
].
<#Target>
xrr:logicalSource [
xrr:query """db.Entities.find()""";
];
rr:subjectMap [
rr:template "TargetBlankNode{$._id}";
rr:termType rr:BlankNode;
];
rr:predicateObjectMap [
rr:predicate oa:hasSource;
rr:objectMap [ rr:template "http://ns.inria.fr/d2kab/article/{$.doc_id}#{$.section_name}"; ];
];
rr:predicateObjectMap [
rr:predicate oa:hasSelector;
rr:objectMap [
rr:template "SelectorBlankNode{$._id}";
rr:termType rr:BlankNode;
];
].
<#Anno>
a rr:TripleMap;
xrr:logicalSource [
xrr:query """db.Entities.find()""";
];
rr:subjectMap [
rr:template "http://ns.inria.fr/d2kab/annotation/{$.entity_id}";
rr:class oa:Annotation;
];
rr:predicateObjectMap [
rr:predicate oa:hasBody;
rr:objectMap [
xrr:reference "$.reference";
rr:termType rr:IRI;
];
];
# Straight relation between the annotation and the article
rr:predicateObjectMap [
rr:predicate schema:about;
rr:objectMap [
rr:template "https://pubmed.ncbi.nlm.nih.gov/{$.doc_id}";
];
];
rr:predicateObjectMap [
rr:predicate oa:hasTarget;
rr:objectMap [
rr:template "TargetBlankNode{$._id}";
rr:termType rr:BlankNode;
];
].