> define $week =
"Monday Tuesday Wednesday Thursday Friday";
and used instead of regular expressions in the attribute/value pairs
> [lemma = $week];
(word lists are not allowed in XML start tags, though)
> define $week += "Saturday Sunday";
> show $week;
use show var; to see all variables
> define $week < "/home/weekdays.txt";
new in CQP v3.4.11: files ending in .gz or .bz2 are
automatically decompressed (see Sec. 3.1),
and word lists can be read from a shell pipe
indicated by a |
character at the start of the filename
for example, to read a file with whitespace-delimited words (and multiple entries per line):
> define $week < "| perl -pe 's/\s+/\n/g' words.txt";
> define $common_noun = "NN NNS";
> define $proper_noun = "NP NPS";
> define $noun = $common_noun;
> define $noun += $proper_noun;
> define $pref="under.+ over.+";
> [(lemma=RE($pref)) & (pos="VBG")];
> [word = RE($pref) %cd];