[CWB] CWB::CQP::More version 0.04
ambs at di.uminho.pt
Mon Jan 24 20:23:39 CET 2011
Just to let you all know that CWB::CQP::More, version 0.04, just hit
CPAN. Main changes can be resumed in the implementation of iterators
over result sets.
my @A = $cqp->cat("A");
This is a problem is @A is too big.
Now, I can:
my $iterator = $cqp->iterator("A");
my $line = $iterator->next;
This way one can iterate over the results, one at a time.
Iterators can get bigger sizes, and optionally, a corpus name:
my $iterator = $cqp->iterator("A", corpus => "foo", size => 20);
my @lines = $iterator->next;
The corpus option makes it possible to switch to other corpora and have
the iterator always working.
Hope it can be useful (for me, it is :))
More information about the CWB