<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Aptos;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.gmail-xml
        {mso-style-name:gmail-xml;}
span.gmail-hljs-tag
        {mso-style-name:gmail-hljs-tag;}
span.gmail-hljs-name
        {mso-style-name:gmail-hljs-name;}
span.gmail-hljs-attr
        {mso-style-name:gmail-hljs-attr;}
span.gmail-hljs-string
        {mso-style-name:gmail-hljs-string;}
span.EmailStyle28
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p style="margin-left:30.0pt"><code><span style="font-size:10.0pt">&quot;example&quot; :: match.instruction_name=&quot;1&quot; expand to instruction;</span></code><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">should do the trick.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Alternatively, if you want to maintain the hit as being just the word searched for, and simply
<i>display</i> nothing outside the rest of the instruction, &nbsp;you can do it by changing the context as follows before printing the query:<o:p></o:p></span></p>
<p style="margin-left:30.0pt"><code><span style="font-size:10.0pt">set Context instruction;</span></code><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">best<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Andrew.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> cwb-bounces@sslmit.unibo.it &lt;cwb-bounces@sslmit.unibo.it&gt;
<b>On Behalf Of </b>Hugo Sanjurjo González<br>
<b>Sent:</b> Tuesday, April 23, 2024 9:08 PM<br>
<b>To:</b> cwb@sslmit.unibo.it<br>
<b>Subject:</b> [CWB] Set context of query that includes a structural attribute<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p>Hi everyone,<o:p></o:p></p>
<p>I'm wondering if there's a way to automatically display the text contained within a structural attribute in the context of a concordance.<o:p></o:p></p>
<p>Let me explain with an example. Consider the following sentence:<o:p></o:p></p>
<div>
<div>
<div style="margin-left:30.0pt">
<pre><span class="gmail-xml">Lorem ipsum dolor sit amet, consectetur adipiscing elit </span><span class="gmail-hljs-tag">&lt;</span><span class="gmail-hljs-name">instruction</span><span class="gmail-hljs-tag"> </span><span class="gmail-hljs-attr">name</span><span class="gmail-hljs-tag">=</span><span class="gmail-hljs-string">&quot;1&quot;</span><span class="gmail-hljs-tag">&gt;</span><span class="gmail-xml"> This is an example of an instruction</span><span class="gmail-hljs-tag">&lt;/</span><span class="gmail-hljs-name">instruction</span><span class="gmail-hljs-tag">&gt;</span><span class="gmail-xml"> Lorem ipsum dolor sit amet, consectetur adipiscing elit.<o:p></o:p></span></pre>
</div>
</div>
</div>
<p>If I run the following query:<o:p></o:p></p>
<p style="margin-left:30.0pt"><code><span style="font-size:10.0pt">&quot;example&quot; :: match.instruction_name=&quot;1&quot;;</span></code><o:p></o:p></p>
<p>I would like cqp to return: <o:p></o:p></p>
<pre style="margin-left:30.0pt">&quot;This is an example of an instruction.&quot;<o:p></o:p></pre>
<p>Is that possible in a simple way? Thank you very much for your help.<o:p></o:p></p>
<div>
<p class="MsoNormal">Hugo<o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm"></td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm"></td>
</tr>
<tr>
<td style="padding:7.5pt 0cm 0cm 0cm">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm"></td>
<td style="padding:0cm 0cm 0cm 22.5pt"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>