[CWB] Assigning cqp queries
Hardie, Andrew
a.hardie at lancaster.ac.uk
Mon Dec 14 16:36:50 CET 2015
It’s not currently possible but it is on the “features to implement” list.
Unfortunately that’s a very long list….
Andrew
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Hannah Kermes
Sent: 14 December 2015 14:16
To: Open source development of the Corpus WorkBench
Subject: Re: [CWB] Assigning cqp queries
Dear all,
a follow-up question to this. Is such a unification or intersection possible in CQPweb (e.g. with saved queries) or is this planned?
Best
Hannah
Am 14.12.2015 um 13:58 schrieb Hannah Kermes:
Hi Alex,
if this hasn't changed in the newest version, you can combine named queries in the following way:
A = intersection B C; A = B ∩ C
A = union B C; A = B ∪ C
A = difference B C; A = B \ C
Best
Hannah
Am 14.12.2015 um 13:35 schrieb Yannick Versley:
Hi Alex,
if you want to do that with the current CQP, the method I'd use (short of using the API)
would be to dump A, B and C to files (CQP writes a list of starting/ending offsets)
and then concatenate/sort these files and read them back in.
as in
A=[pos='JJ'][pos='NN']
Dump A > 'a.txt'
B=[pos='MD'][pos='VV']
Dump B > 'b.txt'
cat a.txt b.txt | sort > ab.txt
Undump D < 'ab.txt'
Best,
Yannick
On Mon, Dec 14, 2015 at 12:30 PM, Trklja, Alex <A.Trklja at exeter.ac.uk<mailto:A.Trklja at exeter.ac.uk>> wrote:
Dear all,
Is it possible in CQP to assign cqp queries to new variables and then re-use them or have you thought about including something along this line to Ziggurat/CWB4? Say, I have the following queries:
A= [pos='JJ'] [pos='NN']
B= [pos='MD] [pos='VV']
C=[pos='RB'] [pos='VV']
And I would like to combine them in the following two ways:
D=A+B
E=A+C
Thanks.
Alex
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://devel.sslmit.unibo.it/mailman/listinfo/cwb
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://devel.sslmit.unibo.it/mailman/listinfo/cwb
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://devel.sslmit.unibo.it/mailman/listinfo/cwb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20151214/ca91abea/attachment-0001.html>
More information about the CWB
mailing list