API Simple freq distribution structures - czcorpus/kontext GitHub Wiki

Simple frequency distribution for text types (structures)

Request

  • URL: /freqtt
  • HTTP Method: GET

URL query arguments

name description
q concordance persistence ID; the value must have a ~ prefix to distinct fully stored queries from legacy/NoSkE ones
fttattr dot-separated structure and structural attribute (e.g. doc.first_published)
ftt_include_empty 0,1 - if 1 then also values with no occurrences will be returned
flimit 0,1,...,N - a minimum absolute frequency of a searched phenomenon
format json (otherwise, an HTML page is returned

Response

  • HTTP status: 200 OK (if without errors)
  • content type: application/json

Important entries

name (path) description
Blocks Frequency results (array)
Blocks[i] Frequency results entry
Blocks[i].Total Total number of items in the result
Blocks[i].Head Array of respective columns (typically - 1) value of a respective structural attr., 2) absolute frequency, 3) ipm
Blocks[i].Items Array of individual lines
Blocks[i].Items[i].Word[0].n Value of a respective structural attribute
Blocks[i].Items[i].freq Absolute frequency
Blocks[i].Items[i].rel Instances per million (ipm)

Please note that the Blocks array contains only a single result set (=table of items). The array type is kept for backward compatibility.