[CWB] Strange problem with a query

Josep M. Fontana josepm.fontana at upf.edu
Wed Jul 25 09:33:50 CEST 2012


Thanks Stefan,

This is indeed the most elegant version and it is good for me to adopt 
good habits so I'll take good note of this.

Josep M.
>>>>> [pos="VV.*"][pos="DT."]? [pos="AV0"]? [pos="AJ.*"]* [pos="N.*"] [pos="AJ.*"][(pos="N.*")|(pos="PR.*")|(pos="TO0")]! within s;
>>> Why did you put the exclamation mark if you're not running a subquery?
>> OK, I thought '!' was the boolean operator for NOT.
> It is, but you put it in the wrong place.  Outside the [...] you can only use regular expression operators, which don't include negation.  Inside the [...], you can use "!" to negate a Boolean expression.  What you wanted is
>
>> [!(pos="N.*" | pos="PR.*" | pos="TO0")]
>
> which is indeed equivalent to
>
>> [(pos!="N.*")&(pos!="PR.*")&(pos!="TO0")]
> I suppose the fastest and most elegant version would be
>
>> [pos != "N.*|PR.*|TO0"]
> Best,
> Stefan
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb



More information about the CWB mailing list