-
Notifications
You must be signed in to change notification settings - Fork 22
API Creating a new subcorpus
mzimandl edited this page Dec 9, 2022
·
1 revision
- URL:
/subcorpus/create?format=json
- HTTP Method:
POST
- content type:
application/json
{
"corpname": "syn2015",
"usesubcorp": null,
"aligned_corpora": [],
"subcname": "s2015-books",
"description": null,
"form_type": "tt-sel",
"text_types": {
"doc.medium": ["B: kniha"]
},
"within": [
{
"structure_name": "doc",
"attribute_cql": "doc.medium=\"B: kniha\"",
"negated": false
}
],
"cql": "[] within <doc medium = \"B: kniha\"/>"
}
name | required / default | description |
---|---|---|
corpname | ✳️ | corpus that will be used to create new subcorpus |
usesubcorp | null |
subcorp id, used only when creating subcorpus from draft |
aligned_corpora | [] |
TODO |
subcname | ✳️ | new subcorpus name |
description | null |
new subcorpus description |
form_type | ✳️ |
tt-sel|within|cql method used to create subcorpus |
text_types | required when form_type = tt-sel
|
text types and their values defining new subcorpus |
within | required when form_type = within
|
within query defining new subcorpus |
cql | required when form_type = cql
|
cql query defining new subcorpus |
- HTTP status:
200 OK
(if without errors) - content type:
application/json
{
"processed_subc": [
{
"ident": "d9ec8608-42d9-4595-8280-3b7659b3d91b",
"label": "syn2015/s2015-books",
"status": "PENDING",
"category": "subcorpus",
"args": {
"subcname": "s2015-books",
"corpname": "syn2015"
},
"created": 1670582868.095303,
"error": null,
"url": null,
"auto_redirect": null
}
],
"messages": []
}
name | description |
---|---|
processed_subc | list of active asynchronous subcorpus jobs (small subcorpora will be done synchronously) |