[CWB] Zero width assertion

Alberto Simões ambs at di.uminho.pt
Wed Feb 8 19:04:05 CET 2012


Hello, Stefan

On 08/02/12 18:00, Stefan Evert wrote:
> It's not supported.  These zero width assertions were implemented for an entirely different purpose, and it just so happens that they can be used to test one extra token at the end of the match, which is a convenient trick in some cases.
>
> In hindsight, I shouldn't have implemented zero width assertions in the first place -- they've made it practically impossible to optimise CQP queries in a general way.
>
>> - would it be possible to implement it?
>
> As Radio Yerevan would put it: in principle, it can be implemented, but no-one's going to want to do that. :-)

Ok, understood :)

> How about the following work-around (unless you want to run those queries in a Web interface and have to squeeze everything into a single CQP query):
>
> 	Pork = ([lemma="have"] @"eaten" | @[lemma="eat"&  pos="VV.*"]) "the" [lemma="pig"];
> 	set Pork matchend target;
> 	cat Pork;
>
> Note the hoops we have to jump through in order to set the target marker correctly, but this is something that could be fixed relatively easily.

Yep, it is for a web interface. I can try to post-process results, 
though. I just though it would be more interesting to have it as a CQP 
feature :)

Thank you
Alberto


More information about the CWB mailing list