[CWB] Filtering results using "free text" metadata

Stefan Evert stefanML at collocations.de
Thu May 31 08:46:01 CEST 2018



> On 31 May 2018, at 08:23, Carolina Cardenas <lccvlccv at aol.com> wrote:
> 
> I would like to know if it is possible to specify in a query that the results must be filtered by a specific attribute which datatype is not “classification”. Let’s say that I have A, B, C, D, E, F, G as metadata and only A and C have “classification” as datatype, the rest of them are “free text”. Is it possible to formulate a query like: “look for the word apple in all texts having as metadata G”? Any help would be highly appreciated.

The best way of doing this is to compile a subcorpus for this restriction, using the "Scan text metadata" option.  This ensures that CQPweb is aware of your search constraints and can e.g. carry out a collocation analysis within the subcorpus (rather than relative to the full corpus).

A quicker way is to use CQP query syntax and include a global constraint for the metadata, e.g.

	<your CQP query> :: match.text_G = "…";

Best,
Stefan


More information about the CWB mailing list