[CWB] What's possible via the CQPweb interface
Stefan Evert
stefanML at collocations.de
Mon Apr 27 09:03:05 CEST 2015
> What I was trying to obtain was the frequency of lemmas that are instantiations of 'POS Y' in a search string of the form 'lemma X POS Y'. In the command line I would have used:
>
> $ count Last by lemma %cd on matchend;
In this simple case, you can get away with a trick that depends on the more or less undocumented MU queries and their deprecated semantics …
If your original query is
[lemma = "LEM"] [pos = "POS"];
the MU expression
MU(meet [pos="POS"] [lemma="LEM"] -1 -1)
returns just the final token of each match, and you can apply frequency breakdown to do the counts.
This is much nicer in CEQL query syntax:
_POS <<1<< {LEM}
Unfortunately, this approach doesn't generalize if you want to count sequences of multiple words or if the original query contains repetition operators.
Cheers,
Stefan
More information about the CWB
mailing list