1 |
24971
|
mateusz.ko
|
<html>
|
2 |
|
|
<head><title>Citation matching RESTful service API description</title></head>
|
3 |
|
|
<body>
|
4 |
|
|
<h1>1 Description</h1>
|
5 |
|
|
|
6 |
|
|
This document contains the description of the RESTful API of the service. The service itself is available at <code>http://services.ceon.pl/coansys/citation_matching.do</code>.
|
7 |
|
|
|
8 |
|
|
<h1>2 Input</h1>
|
9 |
|
|
|
10 |
|
|
The service accepts a query being a text conforming to the JSON schema presented in this section. The query has to be sent using the HTTP POST method.
|
11 |
|
|
|
12 |
|
|
<h2>2.1 Example</h2>
|
13 |
|
|
<pre>
|
14 |
|
|
{
|
15 |
|
|
"citations":[
|
16 |
|
|
{
|
17 |
|
|
"citation-text":"Copernicus, N. (1543). De revolutionibus orbium coelestium."
|
18 |
|
|
},
|
19 |
|
|
{
|
20 |
|
|
"citation-text":"Newton, I. (1687). Philosophiae naturalis principia mathematica."
|
21 |
|
|
}
|
22 |
|
|
]
|
23 |
|
|
}
|
24 |
|
|
</pre>
|
25 |
|
|
|
26 |
|
|
<h2>2.2 JSON schema</h2>
|
27 |
|
|
<pre>
|
28 |
|
|
{
|
29 |
|
|
"required":true,
|
30 |
|
|
"type":"object",
|
31 |
|
|
"properties":{
|
32 |
|
|
"citations":{
|
33 |
|
|
"type":"array",
|
34 |
|
|
"items":{
|
35 |
|
|
"type":"object",
|
36 |
|
|
"required":true,
|
37 |
|
|
"properties":{
|
38 |
|
|
"citation-text":{
|
39 |
|
|
"type":"string",
|
40 |
|
|
"required":true
|
41 |
|
|
}
|
42 |
|
|
}
|
43 |
|
|
}
|
44 |
|
|
}
|
45 |
|
|
}
|
46 |
|
|
}
|
47 |
|
|
</pre>
|
48 |
|
|
|
49 |
|
|
<h1>3 Output</h1>
|
50 |
|
|
|
51 |
|
|
The service returns an answer conforming to the JSON schema presented in this section.
|
52 |
|
|
|
53 |
|
|
<h2>3.1 Example</h2>
|
54 |
|
|
<pre>
|
55 |
|
|
{
|
56 |
|
|
"results":[
|
57 |
|
|
{
|
58 |
|
|
"citation-text":"Copernicus, N. (1543). De revolutionibus orbium coelestium.",
|
59 |
|
|
"extracted-metadata":{
|
60 |
|
|
"author":"Copernicus, N.",
|
61 |
|
|
"year":"1543",
|
62 |
|
|
"title":"De revolutionibus orbium coelestium"
|
63 |
|
|
},
|
64 |
|
|
"matched-documents":[
|
65 |
|
|
{
|
66 |
|
|
"metadata":{
|
67 |
|
|
"id":"doc1",
|
68 |
|
|
"author":"Nicolaus Copernicus",
|
69 |
|
|
"year":"1543",
|
70 |
|
|
"title":"De revolutionibus orbium coelestium",
|
71 |
|
|
"doi":"10.1000/182"
|
72 |
|
|
},
|
73 |
|
|
"score":0.95
|
74 |
|
|
},
|
75 |
|
|
{
|
76 |
|
|
"metadata":{
|
77 |
|
|
"id":"doc123"
|
78 |
|
|
},
|
79 |
|
|
"score":0.6
|
80 |
|
|
}
|
81 |
|
|
]
|
82 |
|
|
},
|
83 |
|
|
{
|
84 |
|
|
"citation-text":"Newton, I. (1687). Philosophiae naturalis principia mathematica.",
|
85 |
|
|
"extracted-metadata":{
|
86 |
|
|
"author":"Newton, I.",
|
87 |
|
|
"year":"1687",
|
88 |
|
|
"title":"Philosophiae naturalis principia mathematica"
|
89 |
|
|
},
|
90 |
|
|
"matched-documents":[
|
91 |
|
|
|
92 |
|
|
]
|
93 |
|
|
}
|
94 |
|
|
]
|
95 |
|
|
}
|
96 |
|
|
</pre>
|
97 |
|
|
|
98 |
|
|
<h2>3.2 JSON schema</h2>
|
99 |
|
|
<pre>
|
100 |
|
|
{
|
101 |
|
|
"required":true,
|
102 |
|
|
"type":"object",
|
103 |
|
|
"properties":{
|
104 |
|
|
"results":{
|
105 |
|
|
"type":"array",
|
106 |
|
|
"items":{
|
107 |
|
|
"type":"object",
|
108 |
|
|
"required":true,
|
109 |
|
|
"properties":{
|
110 |
|
|
"citation-text":{
|
111 |
|
|
"type":"string",
|
112 |
|
|
"required":true
|
113 |
|
|
},
|
114 |
|
|
"extracted-metadata":{
|
115 |
|
|
"type":"object",
|
116 |
|
|
"required":true,
|
117 |
|
|
"properties":{
|
118 |
|
|
"author":{
|
119 |
|
|
"type":"string",
|
120 |
|
|
"required":false
|
121 |
|
|
},
|
122 |
|
|
"year":{
|
123 |
|
|
"type":"string",
|
124 |
|
|
"required":false
|
125 |
|
|
},
|
126 |
|
|
"title":{
|
127 |
|
|
"type":"string",
|
128 |
|
|
"required":false
|
129 |
|
|
},
|
130 |
|
|
"journal":{
|
131 |
|
|
"type":"string",
|
132 |
|
|
"required":false
|
133 |
|
|
},
|
134 |
|
|
"pages":{
|
135 |
|
|
"type":"string",
|
136 |
|
|
"required":false
|
137 |
|
|
}
|
138 |
|
|
}
|
139 |
|
|
},
|
140 |
|
|
"matched-documents":{
|
141 |
|
|
"type":"array",
|
142 |
|
|
"items":{
|
143 |
|
|
"type":"object",
|
144 |
|
|
"properties":{
|
145 |
|
|
"metadata":{
|
146 |
|
|
"type":"object",
|
147 |
|
|
"required":true,
|
148 |
|
|
"properties":{
|
149 |
|
|
"id":{
|
150 |
|
|
"type":"string",
|
151 |
|
|
"required":true
|
152 |
|
|
},
|
153 |
|
|
"doi":{
|
154 |
|
|
"type":"string",
|
155 |
|
|
"required":false
|
156 |
|
|
},
|
157 |
|
|
"author":{
|
158 |
|
|
"type":"string",
|
159 |
|
|
"required":false
|
160 |
|
|
},
|
161 |
|
|
"year":{
|
162 |
|
|
"type":"string",
|
163 |
|
|
"required":false
|
164 |
|
|
},
|
165 |
|
|
"title":{
|
166 |
|
|
"type":"string",
|
167 |
|
|
"required":false
|
168 |
|
|
},
|
169 |
|
|
"journal":{
|
170 |
|
|
"type":"string",
|
171 |
|
|
"required":false
|
172 |
|
|
},
|
173 |
|
|
"pages":{
|
174 |
|
|
"type":"string",
|
175 |
|
|
"required":false
|
176 |
|
|
}
|
177 |
|
|
}
|
178 |
|
|
},
|
179 |
|
|
"score":{
|
180 |
|
|
"type":"number",
|
181 |
|
|
"required":true
|
182 |
|
|
}
|
183 |
|
|
}
|
184 |
|
|
}
|
185 |
|
|
}
|
186 |
|
|
}
|
187 |
|
|
}
|
188 |
|
|
}
|
189 |
|
|
}
|
190 |
|
|
}
|
191 |
|
|
</pre>
|
192 |
|
|
|
193 |
|
|
</body>
|
194 |
|
|
</html>
|