[CWB] Assigning cqp queries

Stefan Evert stefanML at collocations.de
Tue Dec 15 08:55:01 CET 2015


> On 15 Dec 2015, at 08:06, Trklja, Alex <A.Trklja at exeter.ac.uk> wrote:
> 
> Yannick's suggestion works well for me. 

But it does exactly the same thing as the "union" command in CQP!  So if Yannick's solution works for you, "union" will also work.

> Hannah, set operations do not really combine queries the way I'd like it - at least not in Cygwin. For Union the result is an empty set,

I guess you mean "intersection" here?  Of course the intersection is empty, because the two query results are necessarily disjoint sets.

> for Intersection 'count by pos' shows the queries separately: 
> 22045   JJ NN  [#0-#22044]
> 1557    MD VV  [#22045-#23601]

Well, since the two individual queries produce different POS pattern, when you count by pos they will be listed separately.

Perhaps you're actually looking for a _concatenation_ of the query results and just put us on the wrong track with misleading notation?  So that what you call "A + B" would return patterns of the form JJ NN MD VV?

Then the answer is: no, that can't be done at the moment.  It would be relatively easy to implement in your special case, but I don't think people need exactly this operation often enough to make it worth adding to the query language.  A more general implementation quickly becomes fairly tricky.

Are you sure that you can't afford to run each combination query? Does it really take that long?  In this case, you'd save the individual queries as macros, which allows you to combine them in any way you want.

If you really need to make query _results_ reusable, the solution Hannah and I found was to annotate them as a new s-attribute in the corpus, which you can then use in new queries in the standard way.  This will actually be made a little easier in a Ziggurat-based implementation.

Best,
Stefan



More information about the CWB mailing list