[CWB] Performance of "expand to"

Hardie, Andrew a.hardie at lancaster.ac.uk
Mon Feb 13 22:54:07 CET 2012


Why not use CWB::CL and loop a call to CWB::CL::Attribute::cpos2str() from the start to the end point of your text? That gives you maximum flexibility. 

If you're not working within Perl, (or even if you are it might be simpler), just open up a slave process

cwb-decode -C -s $TEXT_START_CPOS -e $TEXT_END_CPOS $CORPUS -P word

and read the text from the slave's stdout.

(In CQPweb, I do actually do it the way you originally tried, using CQP, but this is designed to work for chunks up to circa 2000 words, not 40K words which is what that BNC text is!)

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Eros Zanchetta
Sent: 13 February 2012 21:42
To: cwb at sslmit.unibo.it
Subject: Re: [CWB] Performance of "expand to"

On 02/13/2012 09:10 PM, Stefan Evert wrote:
> I don't know how you came up with this problem, but if this is a query run from some front end (e.g. a Web server), expect your front-end to become confused -- your KWIC lines are far too long and will be truncated at a random point.

You guessed right, I tried using this query to implement a "show full text" feature from a GUI. I suppose I'll have to find some other way of doing it.

Thanks you for the explanation and the bug fix.

Cheers,
Eros
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list