[CWB] Set context of query that includes a structural attribute

Hardie, Andrew a.hardie at lancaster.ac.uk
Wed Apr 24 01:07:59 CEST 2024


"example" :: match.instruction_name="1" expand to instruction;
should do the trick.

Alternatively, if you want to maintain the hit as being just the word searched for, and simply display nothing outside the rest of the instruction,  you can do it by changing the context as follows before printing the query:

set Context instruction;

best

Andrew.

From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Hugo Sanjurjo González
Sent: Tuesday, April 23, 2024 9:08 PM
To: cwb at sslmit.unibo.it
Subject: [CWB] Set context of query that includes a structural attribute


Hi everyone,

I'm wondering if there's a way to automatically display the text contained within a structural attribute in the context of a concordance.

Let me explain with an example. Consider the following sentence:

Lorem ipsum dolor sit amet, consectetur adipiscing elit <instruction name="1"> This is an example of an instruction</instruction> Lorem ipsum dolor sit amet, consectetur adipiscing elit.

If I run the following query:

"example" :: match.instruction_name="1";

I would like cqp to return:

"This is an example of an instruction."

Is that possible in a simple way? Thank you very much for your help.
Hugo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20240423/cd627328/attachment.html>


More information about the CWB mailing list