[CWB] How to know how many texts do not contain a match of a macro

Jose Manuel Martinez Martinez jmmtra at gmail.com
Tue May 28 19:11:41 CEST 2013


Hi everyone,

I am usingmacros to extract some features from a corpus.

For example, I am extracting the German pronoun "man" with this one:

MACRO man(0)
([lemma="man" & pos="PIS"])
;

And to use it in a query I write:
/man[];

Then, I want to find out how many instances of "man" were found in 
eachtext (orsubcorpus).

To do so I use the group command.

group Last match text_id;

And I get something like:

  Frankfurt_1789_9         20
  Danckwerth_1729_2210
  Danckwerth_1729_21     7
  Deckhardt_1611_207
  Frankfurt_1789_10         7
  Stockholm_1647_97

So far so good.But in this way I only get the list of texts (and the 
number of instances) where "man" was found. But I would like to obtain a 
list includingalso the texts that didn't contain any instance of "man".

Something like this:

  Frankfurt_1789_9         20
  Danckwerth_1729_2210
  Danckwerth_1729_21     7
  Deckhardt_1611_207
  Frankfurt_1789_10         7
  Stockholm_1647_97
  Knopf_1800_2 0
  Graz_1686_8 0
Wecker_1679_8 0
Danckwerth_1729_20         0

Is it possiblewith CQP?

Thank you!

Best,

jmm
------------ pr�xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20130528/ba9fbf5b/attachment.html>


More information about the CWB mailing list