Corpus Search

Provides the distribution of hits in the corpus

Changed on
get/search/freq_distrib

Request

  • The document declares no server URL.
  • Auth: HTTP basic

Query parameters

corpnamestring required

Corpus name. To query your own corpus (e.g. username john, corpus mycorpus), use value user/john/mycorpus.

resinteger
Example:50
lpos'-n' | '-v' | '-j' | '-a' | '-d' | '-i'

The part of speech of the lemma. The concrete values depend on the corpus. If the corpus contains the lempos attribute and lpos is empty, the result defaults to the most frequent part of speech of the lemma.

default_attrstring

The attribute applied to tokens in the query which do not have an attribute specified explicitly as part of the query.

attrsstring

A list of comma-delimited attributes that are returned together with each token. Other examples are:word, lc, lemma, tag etc..

structsstring
Example:s,g

A list of comma-delimited structures (=structure tags) that should be included in the result.

refsstring
Example:=bncdoc.alltyp

The text type (metadata) for which statistics should be calculated from the concordance. The default is bncdoc.alltyp (all available text types are included). Text types (attributes and there values) differ between corpora). You can find them in the response of corpus_info method in freqttattrs or subcorpattrs keys. Not all of them have attributes to show.

attr_allpos'kw' | 'all'

Determines which tokens will be returned with additional attributes defined in attrs. kw will add the attributes to the KWIC only. all will return them with all tokens.

viewmode'sen' | 'kwic'

Switches between sentence view and the KWIC view. sen returns complete sentences without trimming them. kwic returns the KWIC view with the query in the centre and some context left and right.

fc_lemword_window_typestring
Example:both
fc_lemword_wsizeinteger
Example:5
fc_lemword_typestring
Example:all
fc_pos_window_typeinteger
Example:5
fc_pos_wsizeinteger
Example:5
fc_pos_typestring
Example:all
jsonobject

An optinal way of wraping parameters. It is possible to send all parametres via this parameter only.

The most frequent uses are:

queryselector: To select the query type. Supported options are: cqlrow, iqueryrow, lemmarow, charrow, phraserow, wordrow. For more information see concordance_query parameters.

iquery: Use with iqueryrow.

cql: Use with cqlrow.

lemma: Use with lemmarow.

lpos: The part of speech of the lemma.

qmcase: Sets the attribute to its lowercased version, i.e. the data are extracted from a lowercased version of the corpus. It used for case insensitive analysis. 1 = case sensitive), 0 = lowercased corpus/case insensitive).

char: Use with charrow.

phrase: Use with phraserow.

word: Use with wordrow

name:

pnfilter:

inclkwic:

filfpos:

filtpos:

desc:

q:

{
  "concordance_query": [
    {
      "queryselector": "iqueryrow",
      "iquery": "test"
    }
  ]
}
normalizeinteger
format'json' | 'xml' | 'csv' | 'tsv' | 'txt' | 'xls'

The format of the output. Empty value is interpreted as JSON. Not every endpoint supports all formats.

Response

OK

granularityinteger
api_versionstring
manatee_versionstring

Example response

{
  "dots": [
    {
      "frq": 64,
      "beg": 72053,
      "end": 2475660
    }
  ],
  "granularity": 50,
  "api_version": "5.63.12",
  "manatee_version": "2.36-7-SkE-2.223.6",
  "request": {
    "concordance_query": [
      {
        "queryselector": "lemmarow",
        "lemma": "cat",
        "lpos": "-n"
      }
    ],
    "structs": "s,g",
    "fc_lemword_type": "all",
    "attrs": "word",
    "json": "{\"concordance_query\":[{\"queryselector\":\"lemmarow\",\"lemma\":\"cat\",\"lpos\":\"-n\",\"qmcase\":false}]}",
    "res": "50",
    "fc_lemword_window_type": "both",
    "normalize": "0",
    "format": "json",
    "attr_allpos": "all",
    "fc_pos_type": "all",
    "fc_pos_wsize": "5",
    "refs": "=bncdoc.alltyp",
    "viewmode": "sen",
    "lpos": "-n",
    "corpname": "preloaded/bnc2_tt21",
    "default_attr": "lemma",
    "fc_lemword_wsize": "5",
    "fc_pos_window_type": "both"
  }
}

Changes

    • breaking

      the query request parameter attr_allpos was restricted to a list of enum values

    • breaking

      for the query request parameter attr_allpos, default value all was added

    • info

      added the new enum value all to the query request parameter attr_allpos

    • info

      added the new enum value kw to the query request parameter attr_allpos