<div dir="ltr">Dear Andrew and Stefan,<div>thank you very much for your helpful answers.</div><div>Stefan, your two solutions work both well. What do you exactly mean with the "within" clause to add to the query?</div>
<div>Thank you very much,</div><div>Leontyna</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/11 Stefan Evert <span dir="ltr"><<a href="mailto:stefanML@collocations.de" target="_blank">stefanML@collocations.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 11 Apr 2013, at 16:18, "Hardie, Andrew" <<a href="mailto:a.hardie@lancaster.ac.uk">a.hardie@lancaster.ac.uk</a>> wrote:<br>
<br>
> Subcorpus = <p_monthstudy="[1-7]">[]*</p_monthstudy>;<br>
> Subcorpus;<br>
<br>
</div>For technical reasons, it's better to use this form:<br>
<br>
Subcorpus = <p_monthstudy="[1-7]">[] expand to p_monthstudy;<br>
Subcorpus;<br>
<br>
otherwise you'll lose all longer paragraphs (containing more than 100 tokens); on a large corpus, this form will also be substantially faster.<br>
<br>
If you don't mind a loss of efficiency, you can run the query on the full corpus and post-filter your results with a global constraint. Note that if you're not confident about working out the correct regular expressions to match single- and double-digit months correctly, you can use numeric comparisons in this second version. Perform this without activating a subcorpus:<br>
<br>
... your query ... :: int(match.p_monthstudy) >= 1 & int(match.p_monthstudy) <= 7;<br>
<br>
You should perhaps add a "within" clause to the query to make sure that the entire match is within a single paragraph, otherwise it's not very sensible to filter on the p_monthstudy attribute.<br>
<br>
Hope this hilft,<br>
Stefan<br>
<br>
<br>
<br>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it">CWB@sslmit.unibo.it</a><br>
<a href="http://devel.sslmit.unibo.it/mailman/listinfo/cwb" target="_blank">http://devel.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Leontyna Bratankova
</div>