[CWB] Assigning cqp queries

Hannah Kermes h.kermes at mx.uni-saarland.de
Mon Dec 14 15:16:22 CET 2015


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
>> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
>
>
>
> _______________________________________________
> CWB mailing list
> 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/8c96160c/attachment.html>


More information about the CWB mailing list