API Collocations - czcorpus/kontext GitHub Wiki
HTTP API / Collocations
Request
- URL:
/collx
- HTTP Method:
GET
URL Query arguments
name |
description |
q |
Concordance persistence ID (starts with the ~ ) |
cattr |
A positional attribute to be used for collocation profile calculation |
cfromw |
Left side of the analysis span window (use negative numbers here) |
ctow |
Right side of the analysis span window (use positive numbers here) |
cminfreq |
Minimum frequency of collocates within the whole corpus |
cminbgr |
Minimum frequency of collocates found in the span cfromw...ctow |
cbgrfns (multi-value) |
Measures to be calculated (see table below for concrete values) |
csortfn |
A measure to be used for items sorting |
citemsperpage |
Number of items per result page |
collpage |
Result page (starting from 1) |
format |
json |
List of the supported measures:
ID |
name |
t |
T-score |
m |
(Pointwise) Mutual information |
3 |
(Pointwise) Mutual information (the MI3 variant) |
l |
log likelihood |
s |
min. sensitivity |
d |
log dice |
p |
MI - log_f |
r |
relative freq. |
Response
- HTTP status:
200 OK
(if without errors)
- content type:
application/json
name (path) |
description |
Head[i].n |
a result table column label |
Head[i].s |
a result table column code (matches measures codes for respective columns, otherwise it is empty) |
Items[i].str |
a collocate token value (specified by the cattr arg.) |
Items[i].freq |
an absolute freq. of a collocate |
Items[i].Stats[i][0].s |
first selected measure value (see the cbgrfns arg.) |
Items[i].Stats[i][N].s |
(N-1)th selected measure value (see the cbgrfns arg.) |