[CWB] Changing to non existing corpus with CWB::CQP
Stefan Evert
stefanML at collocations.de
Mon Nov 8 23:41:07 CET 2010
On 8 Nov 2010, at 21:46, Alberto Simões wrote:
> Yep, defining error_handler. Thanks :)
Or, even better, not letting it happen in the first place -- this _is_ an error, even if the error message doesn't look very useful (it should really say "Corpus is not defined").
Typical idiom would be
our %available = map {$_ => 1} $cqp->exec("show corpora");
...
if ($available{$Corpus}) {
$cqp->exec($Corpus);
...
}
Cheers,
S.
>
> On 08/11/2010 20:39, Alberto Simões wrote:
>> Hello
>>
>> When I change to an non existing corpus using CWB::CQP I receive
>> something like this:
>>
>> =+===CWB::CQP ERROR=====
>> |
>> |
>> =+======================
>>
>> Is there any to silence this message?
More information about the CWB
mailing list