- sort matches alphabetically (and re-displays query results)
> [pos = "IN"] "any|every" [pos = "NN"];
> sort by word;
- add
%c
and %d
flags to ignore case and/or diacritics when
sorting
> sort by word %cd;
- matches can be sorted by any positional attribute; just type
> sort;
without an attribute name to restore the natural ordering by corpus position
- query results can also be sorted in random order (to avoid looking only
at matches from the first part of a corpus when beginning to page through query results):
> sort randomize;
more on random sorting and an important application in
Section 3.6
- select descending order with desc(ending), or sort
matches by suffix with reverse;
note the ordering when the two options are combined:
> sort by word descending reverse;
- sort by right or left context (especially useful for keyword searches)
> "interesting";
> sort by word %cd on matchend[1] .. matchend[42];
(right context)
> sort by word %cd on match[-1] .. match[-42];
(left context, by words)
> sort by word %cd on match[-42] .. match[-1] reverse;
(same by characters)
- compute frequency distribution of matching word sequences (or annotations)
> count by word;
> count by lemma;
%c
and %d
flags normalise case and/or diacritics before counting
> count by word %cd;
- set frequency threshold with cut option
> count by lemma cut 10;
- descending option affects ordering of word sequences with the
same frequency; use reverse for some amusing effects (note that
these keywords go before the cut option)
- see Sections 3.2 and 3.3 for an
explanation of the syntax used in these examples and more information about
the sort and count commands