Utility for web interface only. Provides relative frequency data for wordlist graphs within a specific time period, only for trend corpora.
Changed onRequest
- The document declares no server URL.
- Auth: HTTP basic
Query parameters
Corpus name. To query your own corpus (e.g. username john, corpus mycorpus), use value user/john/mycorpus.
Sets the corpus attribute you want to work with. Some corpora may have specific additional attributes.
Basic examples:
- word
- lc
- lemma
- lemma_lc
- lempos
- lempos_lc
- tag
- pos
For list of available word list attributes see /ca/api/corpora/{corpusId}
A diachronic attribute to be selected. Available attributes can differ in corpora. Examples can be doc.year or doc.month.
1: display results during calculation 0: display results after all data has been calculated (can take quite a lot of time).
Determines which periods are included in the results. It signifies the percentage above the average size, acting as a limit. When relative frequency (rel_frq) surpasses this limit, it is discarded (moved to removed_freqdist object).
Minus means left context (-1<0). Plus means right context (6>0).
Positions can be referenced as follows:
integer number - where 0 is the first token, -1 the rightmost token in the left context etc.
1:x - where x is one of the corpus structures (e.g. “doc” or “s” if the corpus has the particular markup). Its meaning is the first token in the structure, except when it is the right boundary of a range - then it is the last token in the structure. Also, other numbers can be used, e.g. -2:x, 3:x, etc. (-1 is the same as 1 with meaning “structure containing searched word”)
a<0 - where a stands for a position reference as described in the first two points with meaning 'a positions before/after the first searched word position' (so this is equivalent to a)
a>0 - where a stands for the same position reference with meaning 'positions before/after the last searched word position'
in the previous two points, if 0 is substituted with a natural number k, it means 'before/after k-th collocation' instead of 'before/after KWIC'. Collocations are special token groups in the context, that can be added using positive filters (see below).
Ranges can be referenced as a~b where a, b stand for token identifiers as above. Examples of positions and ranges:
-1<0 - rightmost token in the left context
3>0 - third token in right context
0>0 - last token
0<0 - first token
0<0~0>0 - range
-1<0~1>0 - range with one token from the left context and one from the right context
1:s - first token in the sentence containing searched word (or its first token)
1:s>0 - first token in the sentence containing searched word (or its last token)
0<1 - first token of the first-added collocation.
Examples:
sword/ 1>0~3>0
sword/ 1>0~3>0
slemma/ 0<0~0>0
sword/i -1
sword/ 0
word/ir -1<0
tag/r -2<0
A wordlist of words for which the relative frequency should be counted. No exact example is here because it is already set in JSON parameter.\Example: ['the','a','lion'].
An optinal way of wraping parameters. It is possible to send all relevant parametres via this parameter only. It is classic JSON format.
wordlist: words for which the relative frequency should be counted.
{
"wordlist": [
"the",
",",
"\\.",
"to",
"and",
"of",
"a",
"in",
"\"",
"for",
"that",
"is",
"it",
"on",
"with",
"as",
"was",
"i",
"you",
"at",
"this",
"be",
"are",
"from",
"have",
"by",
":",
"he",
"has",
"'s",
"\\)",
"but",
"\\(",
"we",
"an",
"they",
"will",
"'",
"not",
"his",
"said",
"or",
"their",
"can",
"n't",
"more",
"–",
"your",
"one",
"who"
]
}Response
OK
Example response
{
"lc": "the",
"freqdist": {
"2021-11": {
"frq": 679638,
"rel_frq": 3022.91023457566,
"period_size": 224829038
}
},
"removed_freqdist": {
"2023-08": {
"period_size": 429451774
}
},
"average_norm": 136780187.25,
"norm_limit": 6839009.362500001
}Changes
- info
endpoint added
- info