[CWB] Filtering results using "free text" metadata
Hardie, Andrew
a.hardie at lancaster.ac.uk
Thu May 31 11:52:02 CEST 2018
Note that Stefan's quicker way will only work if your text-metadata field G was originally derived from an XML element (s-attribute).
If you loaded your text metadata from a separate plain text file (which is what I usually do though Stefan prefers to keep text metadata in the XML), it won't work: you need to use "scan text metadata" to create a subcorpus.
best
Andrew.
-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Stefan Evert
Sent: 31 May 2018 07:46
To: CWBdev Mailing List <cwb at sslmit.unibo.it>
Cc: Carolina Cardenas <lccvlccv at aol.com>
Subject: Re: [CWB] Filtering results using "free text" metadata
> 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
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb
More information about the CWB
mailing list