This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
1990 lines (1816 loc) · 82.3 KB
/
swagger.yaml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: '2.0'
info:
version: '0.2'
title: FREME API Documentation
host: api-dev.freme-project.eu
basePath: /current
tags:
- name: e-Entity
- name: e-Link
- name: e-Publishing
- name: e-Translation
- name: User
- name: Postprocessing
- name: General Information
description: >
This section defines the default parameter set for all FREME e-Services.
The parameters have a long and a short form. If both are set, the long form
overrides the short form. The API follows the [NIF API
specifications](http://persistence.uni-leipzig.org/nlp2rdf/specification/api.html).
Please note that all parameter values submitted via the URLs query string
need to be URL encoded according to [RFC
3986](https://tools.ietf.org/html/rfc3986).
* input (short form: i):
* input of the e-Service in plaintext or nif
* no default
* depends on informat and intype
* informat (short form: f):
* format of input parameter.
* possible values
* text (plaintext)
* text/turtle (default), short form: turtle
* application/ld+json, short form: json-ld
* application/n-triples, short form: n-triples
* application/rdf+xml, short form: rdf-xml
* text/n3, short form: n3
* text/html: Submit HTML as input. This will convert the HTML to NIF
and then send it to the underlying service.
* application/x-xliff+xml: Submit XLIFF 1.2 as input. This will
convert the XLIFF to NIF and then send it to the underlying service.
* application/x-openoffice
* text/xml
* outformat (short form: o):
* output format
* possible values
* text/turtle (default), short form: turtle
* application/ld+json, short form: json-ld
* application/n-triples, short form: n-triples
* application/rdf+xml, short form: rdf-xml
* text/n3, short form: n3
* text/html: Submit HTML as input. This will convert the HTML to NIF
and then send it to the underlying service.
* prefix (short form: p)
* Controls the url of rdf resources generated from plaintext. Has default
value "http://freme-project.eu/"
The following header values are used by all FREME e-Services
* Accept
* possible values
* text/n3
* text/turtle
* application/ld+json
* application/n-triples
* application/rdf+xml
* text/html
* When parameter outformat is set then the Accept header is not used by
FREME API.
* Content-Type
* possible values
* text (plaintext)
* text/n3
* text/turtle
* application/ld+json
* application/n-triples
* application/rdf+xml
* application/x-xliff+xml
* text/html
* application/x-openoffice
* text/xml
* When parameter informat is set then the Content-Type header is not used
by FREME api
schemes:
- http
paths:
/user:
post:
tags:
- User
summary: Create a new user
description: >
Creates a new user. See the<a
href="./../knowledge-base/authentication.html" target="_blank">
Authentication article</a> for detailed information.
produces:
- application/json
parameters:
- name: username
in: query
description: Username of user to be created. It can only consist of characters from a-z and A-Z.
required: true
type: string
- name: password
in: query
description: Password for new user. It needs to be at least 8 characters long.
required: true
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
get:
tags:
- User
summary: Get information about all users
description: >
Get information about all users in the system. You need to be
authenticated as administrator to have access to this API call.
produces:
- application/json
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
'/user/{username}':
get:
tags:
- User
summary: Get information about all users
description: >
Get information about a user. You need to be authenticated as that user
or as an administrator user to access this API call.
The information about the user will be printed in JSON format.
**Example JSON Response**
<pre lang="json"><code>
{
"name": "henry",
"role": "ROLE_USER",
"tokens": [
{
"token":
"a2baa132-da71-4cb9-b87a-e460bc67b167",
"creationDate": 1438699940000,
"lastUsedDate": 1438699954000
}
]
}
</code></pre>
produces:
- application/json
parameters:
- name: username
in: path
type: string
required: true
description: Username of user to get information about
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
delete:
tags:
- User
summary: Deletes a specific user
description: >
Delete a user. This will also delete all of his access tokens.
You need to be authenticated as that user or as an admin user to access
this API call.
parameters:
- name: username
in: path
description: The username of the user to delete
required: true
type: string
responses:
'200':
description: Successful response
schema:
type: string
'204':
description: No content - Succesful removal
'400':
description: Bad request - input validation failed
/authenticate:
post:
tags:
- User
summary: Authenticate as an existing user
description: >
Create an access token for given user that was previously created by POST
/user.
An access token is a 36 characters long string. You can attach the access
token to every FREME API call using the header field X-Auth-Token, or in
this API-Documentation, with the input field at the very bottom.
See the<a href="./../knowledge-base/authentication.html" target="_blank">
Authentication article</a> for detailed information.
**Example Response**
<pre lang="json"><code>
{
"token": "f81ccf99-1d01-4e79-9a0b-8dfe84d8303c"
}
</code></pre>
consumes:
- text/plain
produces:
- application/json
parameters:
- name: X-Auth-Username
in: header
description: Username of user to attempt to authenticate as
required: true
type: string
- name: X-Auth-Password
in: header
description: Password of user to attempt to authenticate as
required: true
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
/pipelining/templates/:
post:
tags:
- pipelining
summary: Create a new pipelining template
description: >
Here you can submit a new pipelining template as a JSON String. It
represents an object with a label, a description, and a list of request
objects.
#Example
<pre><code>
{
"label": "Spotlight-Link",
"description": "Recognises entities using Spotlight en enriches with
geo information.",
"serializedRequests": [
{
"method": "POST",
"endpoint":
"http://api.freme-project.eu/current/e-entity/dbpedia-spotlight/documents",
"parameters": {
"language": "en"
},
"headers": {
"content-type": "text/plain",
"accept": "text/turtle"
}
},
{
"method": "POST",
"endpoint":
"http://api.freme-project.eu/current/e-link/documents/",
"parameters": {
"templateid": "3"
},
"headers": {
"content-type": "text/turtle",
"accept": "text/turtle"
}
}
]
}
</pre></code>
If the request was successful, the service will return the JSON object
with the following parameters:
- `id`: the generated id if the template. This is also the timestamp of
creation, in milliseconds.
- `owner`: the owner, in this case the creator, of the pipeline
template.
- `label`: The name of the pipeline template.
- `description`: a description of the pipeline template.
- `persist`: if false, the template will not automatically be deleted; if
false it will live only for one week. To be implemented.
- `serializedRequests`: the chained requests as described in
/pipelining/chain.
consumes:
- application/json
produces:
- application/json
parameters:
- name: persist
in: query
description: 'Optional parameter: values can be `true` or `false`. Indicates whether to persist the pipeline for ever (`true`) or just for one week (`false`). Defaults to `false`'
required: false
type: string
- name: visibility
in: query
description: 'Optional parameter: values can `PRIVATE` or `PUBLIC`. A template with visibility `PUBLIC` is visible and usable by anyone. A template with visibility `PRIVATE` is only visible and usable by the owner. Defaults to `PUBLIC`'
required: false
type: string
- name: body
in: body
description: The pipeline template as JSON
required: true
schema:
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
'401':
description: Unauthorized - user needs to be logged in for this action
'500':
description: Internal Server Error - something went wrong unexpectedly
get:
tags:
- pipelining
summary: Get all pipelining templates
description: Returns all visible pipelining templates
produces:
- application/json
responses:
'200':
description: Successful response
schema:
type: string
'/pipelining/templates/{id}':
put:
tags:
- pipelining
summary: Update an existing pipelining template
description: Update an existing pipelining template with new information
consumes:
- application/json
produces:
- application/json
parameters:
- name: id
description: ID of the template you with to update
in: path
required: true
type: string
- name: persist
in: query
description: 'Optional parameter: values can be `true` or `false`. Indicates whether to persist the pipeline for ever (`true`) or just for one week (`false`). Defaults to `false`'
required: false
type: string
- name: visibility
in: query
description: 'Optional parameter: values can `PRIVATE` or `PUBLIC`. A template with visibility `PUBLIC` is visible and usable by anyone. A template with visibility `PRIVATE` is only visible and usable by the owner. Defaults to `PUBLIC`'
required: false
type: string
- name: body
in: body
description: 'The pipeline template as JSON, as described in `POST /pipelining/templates/`'
required: false
schema:
type: string
- name: owner
description: Optional parameter. Can be used to transfer ownership to a different user
in: query
required: false
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
'403':
description: Forbidden - user has no permission to udpate this template
'404':
description: Not found - the template does not exist
'500':
description: Internal Server Error - something went wrong unexpectedly
get:
tags:
- pipelining
summary: Get a specific pipelining template
description: Returns the pipeline with the given id found on the server the request is sent to.
produces:
- application/json
parameters:
- name: id
in: path
required: true
description: ID of template to return
type: string
responses:
'200':
description: Successful response
schema:
type: string
'404':
description: Not found - the template does not exist
delete:
tags:
- pipelining
summary: Delete a pipelining template
description: Deletes the pipelining template with the specified id
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: string
description: ID of template that will be deleted
responses:
'200':
description: Successful response
schema:
type: string
'403':
description: Forbidden - user has no permission to delete this template
'404':
description: Not found - the template does not exist
'/pipelining/chain/{id}':
post:
tags:
- pipelining
summary: Pipelining with a template
description: Use an existing pipelining template to perform your pipelining task
consumes:
- text/turtle
- application/json
- application/ld+json
- application/n-triples
- application/rdf+xml
- text/n3
- text/plain
produces:
- application/json
parameters:
- name: id
in: path
description: Id of the pipeline-template to be used
required: true
type: string
- name: body
in: body
description: 'Input for pipeline chain, can be NIF or plain text'
required: true
schema:
type: string
- name: stats
required: false
description: 'If true, adds timing statistics to the response: total duration of the pipeline and duration of each service called in the pipeline (in milliseconds).'
enum:
- 'true'
- 'false'
default: 'false'
in: query
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad Request - input validation failed
'401':
description: Unauthorized - user needs to be logged in for this action
'404':
description: Not found
'500':
description: Internal Server Error - something went wrong unexpectedly
/pipelining/chain:
post:
tags:
- pipelining
summary: Pipelining multiple requests
description: "At the moment only supports POST Method.\n\nAlways consumes application/json and produces the MIME Type specified in the last request.\n\nThe body must be a JSON String with the following format:\n\n* `method` - the method of the request. Possible values are GET or POST.\\\n* `endpoint` - the endpoint of the service.\n* `parameters` - a map of request parameters. Possible values depend on the service. Typical parameters are informat, outformat, input, etc.\n* `headers` - a map of request headers. Possible values depend on the service. Typical headers are content-type and accept.\n* `body` - The contents to send to the service. This also depends on the service of course.\n\n**Remark**\n\nOnly the first request can have content, i.e. a body or a parameter input. This is because the output of the first request serves as input for the second, and so on. If there is content in a subsequent request, it will be ignored.\n\n\n\n#Examples\n**e-Entity, e-Link**\n\n<pre lang=\\\"json\\\"><code>\n[\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-entity/dbpedia-spotlight/documents",\n "parameters": {\n "language": "en"\n },\n "headers": {\n "content-type": "text/plain",\n "accept": "text/turtle"\n },\n "body": "This summer there is the Zomerbar in Antwerp, one of the most beautiful cities in Belgium."\n},\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-link/documents/",\n "parameters": {\n "templateid": "3"\n },\n "headers": {\n "content-type": "text/turtle",\n "accept": "text/turtle"\n }\n}\n]\n</code></pre>\n\n**e-Entity, e-Link, e-Translate**\n<pre lang=\\\"json\\\"><code>\n[\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-entity/dbpedia-spotlight/documents",\n "parameters": {\n "language": "en"\n },\n "headers": {\n "content-type": "text/plain",\n "accept": "text/turtle"\n },\n "body": "The Belfry in Ghent is one of the oldest buildings in Belgium."\n},\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-link/documents/",\n "parameters": {\n "templateid": "3"\n },\n "headers": {\n "content-type": "text/turtle",\n "accept": "text/turtle"\n }\n},\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-translation/tilde",\n "parameters": {\n "source-lang": "en",\n "target-lang": "fr"\n },\n "headers": {\n "content-type": "text/turtle",\n "accept": "text/turtle"\n }\n}\n]\n</code></pre>\n\n**e-Entity, e-Link, e-Terminology**\n\n<pre lang=\\\"json\\\"><code>\n[\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-entity/freme-ner/documents",\n "parameters": {\n "dataset": "dbpedia",\n "language": "en"\n },\n "headers": {\n "content-type": "text/plain",\n "accept": "text/turtle"\n },\n "body": "With just 200,000 residents, Reykjavík ranks as one of Europe's smallest capital cities. But when Iceland's total population only hovers around 300,000, it makes sense that the capital is known as the big city?? and offers all the cultural perks of a much larger place.\\n\\n From live music almost every night to cosy cafes, colourful houses and friendly cats roaming the street, Reykjavík has all the charms of a small town in a fun capital city,?? said Kaelene Spence, "\n},\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-link/documents/",\n "parameters": {\n "templateid": "3"\n },\n "headers": {\n "content-type": "text/turtle",\n "accept": "text/turtle"\n }\n},\n{\n "method": "POST",\n "endpoint": "http://api.freme-project.eu/current/e-terminology/tilde",\n "parameters": {\n "source-lang": "en",\n "target-lang": "nl"\n },\n "headers": {\n "content-type": "text/turtle",\n "accept": "text/turtle"\n }\n}\n]\n</code></pre>\n"
consumes:
- application/json
parameters:
- name: body
in: body
description: 'Body of request in JSON format, see above.'
required: true
schema:
type: string
- name: stats
required: false
description: 'If true, adds timing statistics to the response: total duration of the pipeline and duration of each service called in the pipeline (in milliseconds).'
enum:
- 'true'
- 'false'
default: 'false'
in: query
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad request - input validation failed
/e-entity/dbpedia-spotlight/documents:
post:
tags:
- e-Entity
summary: 'Entity recognition and linking using DBPedia Spotlight engine. '
description: " Enriches Text content with entities gathered from various datasets by the DBPedia-Spotlight Engine.\n"
operationId: executeSpotlightNel
consumes:
- text/n3
- text/turtle
- application/ld+json
- application/n-triples
- text/plain
- application/rdf+xml
- application/x-xliff+xml
- text/html
- application/x-openoffice
- text/xml
produces:
- text/n3
- text/turtle
- application/ld+json
- application/n-triples
- application/rdf+xml
- application/x-xliff+xml
- text/html
- application/x-openoffice
- text/xml
parameters:
- name: input
in: query
description: The text to enrich.
required: false
type: string
- name: informat
in: query
description: Format of input string.
enum:
- text
- json-ld
- turtle
- n3
- n-triples
- rdf-xml
- text/html
- text/xml
- application/x-xliff+xml
- application/x-openoffice
default: turtle
required: false
type: string
- name: outformat
in: query
description: 'RDF serialization format of Output. Can be json-ld, turtle, n3, n-triples, rdf-xml. Defaults to "turtle". Overrides Accept Header (Response Content Type). Short form is o.'
required: false
type: string
default: turtle
enum:
- json-ld
- turtle
- n3
- n-triples
- rdf-xml
- text/html
- text/xml
- application/x-xliff+xml
- application/x-openoffice
- name: prefix
in: query
description: 'Controls the url of rdf resources generated from plaintext. Has default value "http://freme-project.eu/". Short form is p.'
required: false
type: string
- in: body
name: body
description: The text to enrich.
required: false
schema:
type: string
- name: numLinks
in: query
description: The number of links from a knowledge base returned for each entity. Note that for some entities it might returned less links than requested. This might be due to the low number of links available. The maximum number of links that can be returned is 5.
required: false
type: string
default: '1'
- name: language
in: query
description: 'Source language. Can be en, de, nl, fr, it, es (according to supported NER engine).'
required: false
type: string
enum:
- en
default: en
- name: confidence
in: query
description: 'Setting a high confidence threshold instructs DBpedia Spotlight to avoid incorrect annotations as much as possible at the risk of losing some correct ones. A confidence value of 0.7 will eliminate 70% of incorrectly disambiguated test cases. The range of the confidence parameter is between 0 and 1. Default is 0.3'
required: false
type: string
default: '0.3'
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad request - input validation failed
/e-entity/freme-ner/datasets:
get:
tags:
- e-Entity
summary: Get info about all available datasets
description: Get info about all available datasets
operationId: getAllDatasets
responses:
'200':
description: Successful response
schema:
type: string
'500':
description: Internal Server Error - encountered an unexpected condition which prevented it from fulfilling the request
'502':
description: Bad Gateway - recieved an invalid response from the FREME NER server
post:
tags:
- e-Entity
summary: Submitting dataset for use in the e-Entity service
description: "Create dataset in SKOS format which includes prefLabel, altLabel or label properties (unless the param properties is explicitly set).\n\n**Example [SKOS](http://www.w3.org/TR/skos-reference/) Dataset**\n<pre lang=\"turtle\"> <code> <http://www.lib.ncsu.edu/ld/onld/00000326 > <http://www.w3.org/2004/02/skos/core#prefLabel > "101 Communications" .\n <http://www.lib.ncsu.edu/ld/onld/00000326 > <http://www.w3.org/2004/02/skos/core#altLabel > "101 Communications, Inc" .\n <http://www.lib.ncsu.edu/ld/onld/00000326 > <http://www.w3.org/2004/02/skos/core#altLabel > "101 Communications, LLC" .\n <http://www.lib.ncsu.edu/ld/onld/00000326 > <http://www.w3.org/2004/02/skos/core#altLabel > "101communications" .\n <http://www.lib.ncsu.edu/ld/onld/00001273 > <http://www.w3.org/2004/02/skos/core#prefLabel > "2Cs Communications" .\n <http://www.lib.ncsu.edu/ld/onld/00000842 > <http://www.w3.org/2004/02/skos/core#prefLabel > "2x4 (Design studio)" .\n </code> </pre>\n**Example for sparql parameter**\n<pre lang=\"sparql\"><code> SELECT ?res ?label \n WHERE { ?res <http://www.w3.org/2000/01/rdf-schema#label > ?label . \n ?res <http://www.w3.org/1999/02/22-rdf-syntax-ns#type > \n <http://dbpedia.org/ontology/Country > FILTER ( strstarts(str(?res), "http://dbpedia.org/") ) \n } ORDER BY ?res LIMIT 500 OFFSET 500' </code></pre>\nThe query returns a list of triples where the subject is the entity URI, and the object is the label of the entity. This query returns 500 entities of type Country from DBpedia with their URI and label.\n\n**Note 1:**\n\nThe properties `http://www.w3.org/2004/02/skos/core#:altLabel` and `http://www.w3.org/2004/02/skos/core#:prefLabel` here are indexed (by default, `skos:altLabel`, `skos:prefLabel`, `rdfs:label` are indexed, please see docs). This is configurable. So even if it's `anyPrefix:someOtherPredicate`, we can support it through the `properties` parameter in FREME NER while dataset creation. For example add `properties=www.example.com/me` to your query to index the property `www.example.com/me`.\n\n**Note 2:**\n\nSKOS datasets (see above, can even be non-skos labels as long as the user specifies them, but it's recommended to stick to skos/rdfs) are a minimum, they give us labels to build gazetteers from. But if the dataset providers have raw RDF with various other kinds of information (like location, geo-coordinates, sameAs, closeMatch etc.) they can include them too. So basically, send them all in. That will only help the entity linker in performing better disambiguation by taking into account inter-resource links.\n"
operationId: createDataset
consumes:
- text/n3
- text/turtle
- application/ld+json
- application/n-triples
- application/rdf+xml
produces:
- application/json
parameters:
- name: informat
in: query
description: 'RDF serialization format of the dataset. Can be json-ld, turtle, n3, n-triples, rdf-xml. Overrides Content-Type header. Short form is f.'
required: false
type: string
default: turtle
enum:
- json-ld
- turtle
- n3
- n-triples
- rdf-xml
- in: body
name: body
description: 'The dataset. The format of the body can be text/turtle, application/ld+json, application/n-triples, application/rdf+xml, text/n3. Defaults to "text/turtle". The parameter *informat* overrides the Content-Type.'
required: false
schema:
type: string
- name: name
in: query
description: 'proposed dataset name. It can be considered as ID for the dataset. It should include only numbers, letters and should NOT include white spaces.'
required: false
type: string
- name: description
in: query
description: Short description of the submitted dataset.
required: false
type: string
- name: sparql
in: query
description: 'This parameter should be used in combination with the "endpoint" parameter. The value of the sparql parameter is a SPARQL query which selects subset of a dataset for import in FREME NER.'
required: false
type: string
x-force-textarea: true
- name: endpoint
in: query
description: 'a SPARQL endpoint against which the SPARQL query specified with the "sparql" parameter should be executed. The endpoint parameter makes sense to use only in combination with the "sparql" parameter. An example is "http://dbpedia.org/sparql" '
required: false
type: string
- name: language
in: query
description: 'language of the labels in the dataset. If the parameter is not specified, all labels without language tag will be used while performing linking.'
required: false
type: string
enum:
- de
- en
- it
- fr
- es
- nl
- ru
- name: properties
description: 'Add properties you want to index (see Note 1). If you want to add more than one property, separate them by comma, e.g. `properties=http://www.example.com/prop1,http://www.example.com/prop2`.'
in: query
type: string
x-force-textarea: true
responses:
'201':
description: Created - the dataset was successfuly created
schema:
type: string
'400':
description: Bad request - required parameter is not specified or invalid format specified or requested
'500':
description: Internal Server Error - encountered an unexpected condition which prevented it from fulfilling the request
'502':
description: Bad Gateway - recieved an invalid response from the FREME NER server
'/e-entity/freme-ner/datasets/{name}':
get:
tags:
- e-Entity
summary: Get info about a specific dataset
description: Get info about a specific dataset specified by its name
operationId: getDataset
parameters:
- name: name
in: path
description: The name of the requested dataset.
required: true
type: string
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad request - required parameter is not specified or invalid format specified or requested
'500':
description: Internal Server Error - encountered an unexpected condition which prevented it from fulfilling the request
'502':
description: Bad Gateway - recieved an invalid response from the FREME NER server
put:
tags:
- e-Entity
summary: Updating dataset for use in the e-Entity service
description: >
Update a dataset with new data for use in the e-Entity service. The new
data will be added to the existing dataset instead of overwriting the
existing data. This can be used to upload a large dataset in multiple
chunks.
for an example SKOS Dataset.
operationId: updateDataset
consumes:
- text/n3
- text/turtle
- application/ld+json
- application/n-triples
- application/rdf+xml
produces:
- text/n3
- text/turtle
- application/ld+json
- application/n-triples
- application/rdf+xml
parameters:
- name: informat
in: query
description: 'RDF serialization format of the dataset. Can be json-ld, turtle, n3, n-triples, rdf-xml. Overrides Content-Type header. Short form is f.'
required: false
type: string
default: turtle
enum:
- json-ld
- turtle
- n3
- n-triples
- rdf-xml
- in: body
name: body
description: 'The dataset. The format of the body can be json-ld, turtle, n3, n-triples, rdf-xml. Defaults to "text/turtle". The parameter *informat* overrides the Content-Type.'
required: false
schema:
type: string
- name: name
in: path
description: 'The name name of the dataset to update. It can be considered as ID for the dataset. It should include only numbers, letters and should NOT include white spaces.'
required: true
type: string
- name: language
in: query
description: 'language of the labels in the dataset. If the parameter is not specified, all labels without language tag will be used while performing linking. At the moment only following languages are supported - FREME NER (en/de/fr/es/it), DBpedia Spotlight (en).'
required: false
type: string
enum:
- de
- en
- nl
- it
- fr
- es
- ru
responses:
'200':
description: Successful response
schema:
type: string
'400':
description: Bad request - required parameter is not specified or invalid format specified or requested
'500':
description: Internal Server Error - encountered an unexpected condition which prevented it from fulfilling the request
'502':
description: Bad Gateway - recieved an invalid response from the FREME NER server
delete:
tags:
- e-Entity
summary: Removing a specific dataset
description: Remove a dataset in the FREME-NER engine specified by its name
operationId: removeDataset
parameters:
- name: name
in: path
description: The name of the dataset to remove
required: true
type: string
responses:
'200':
description: Succesful removal
schema:
type: string
'400':
description: Bad request - required parameter is not specified or invalid format specified or requested
'500':
description: Internal Server Error - encountered an unexpected condition which prevented it from fulfilling the request
'502':
description: Bad Gateway - recieved an invalid response from the FREME NER server
/e-entity/freme-ner/documents:
post:
tags:
- e-Entity
summary: Entity recognition and linking using Freme-NER engine.
description: >
Enriches Text content with entities gathered from various datasets
by the DBPedia-Spotlight Engine. The service accepts plaintext or text
sent
as NIF document. The text of the nif:isString property (attached to the
nif:Context document) will be used for processing. This example shows a
NIF document that can be processed by the service:
<pre lang="sparql"><code>
@prefix
nif:<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#>
.
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.org/document/1#char=0,21>
a nif:String , nif:Context, nif:RFC5147String ;
nif:isString "Welcome to Berlin"^^xsd:string;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "21"^^xsd:nonNegativeInteger;
nif:sourceUrl
<http://differentday.blogspot.com/2007_01_01_archive.html>.