<div dir="ltr">Thank you, Stephanie, this is what I was looking for. For the regex, I guess I can do something like text_id = "(ID1|ID2|IDn)”<div><br></div><div>In the other hand, when you said “so this can be tedious (or not work at all) if you have a very long list of text IDs”, which thing could not work? If I have like, say, 100 docs, could this approach not work?</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">El vie, 27 jun 2025 a la(s) 4:28 a.m., Stephanie Evert (<a href="mailto:stefanML@collocations.de">stefanML@collocations.de</a>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Ramiro,<div><br></div><div>I suppose that you're talking about doing the subcorpus search directly in CQP?  Then you can simply restrict your matches to those in the desired documents.  You can either do it in the CQP query</div><div><br></div><div><span style="white-space:pre-wrap">   </span>.... query ... within text :: match.text_id = "...";</div><div><br></div><div>or you can make a subcorpus of all relevant texts</div><div><br></div><div><span style="white-space:pre-wrap"> </span>Sub = <text_id = "..."> [] expand to text;</div><div><br></div><div>then activate it for a subcorpus search:</div><div><br></div><div><span style="white-space:pre-wrap">      </span>Sub;</div><div><span style="white-space:pre-wrap">     </span>... query ...;</div><div><br></div><div>The inconvenience is that you can use word lists with s-attributes, so this can be tedious (or not work at all) if you have a very long list of text IDs. You have to match against a regular expressions that is essentially a disjunction of the relevant text IDs.</div><div><br></div><div>Hope this helps,</div><div>Stephanie</div><div><br></div><div><br id="m_-3737912591287954387lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 26 Jun 2025, at 21:21, Ramiro Santa Ana Anguiano <<a href="mailto:dev@academia.org.mx" target="_blank">dev@academia.org.mx</a>> wrote:</div><br><div><p style="font-family:ArialMT;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">I wonder how I can do a search but only on documents with specific text_ids.</p><p style="font-family:ArialMT;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">I think what I am looking for is in the<span> </span><a href="https://cwb.sourceforge.io/files/CQP_Manual.pdf" target="_blank">CQP Manual</a><span> </span>(probably on page 30), but I am not sure about the right syntax in order to achieve this.</p><br></div></blockquote></div><br></div></div>_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="http://liste.sslmit.unibo.it/mailman/listinfo/cwb" rel="noreferrer" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
</blockquote></div>