<div dir="ltr">Thank you for your answer, Stephanie! It makes sense now.<br>Cheers!<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>--</div><div><div>José Manuel Martínez Martínez</div><div><a href="https://chozelinek.github.io" target="_blank">https://chozelinek.github.io</a></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 31, 2022 at 7:51 PM Stephanie Evert &lt;<a href="mailto:stefanML@collocations.de">stefanML@collocations.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
&gt; I have a corpus for which each sentence we have an structural attribute s_lsent_linguistic_features that can have a value from 0 to 1.<br>
&gt; I want to filter the sentences with a value lower than 0.3.<br>
&gt; I&#39;ve seen in the documentation that one can use the int built-in function to make comparisons with values that should be interpreted as numbers.<br>
&gt; I&#39;m using something like this<br>
&gt; &lt;s&gt;[_.s_sent_quality_score = &quot;0\.[1|2|3].*&quot;]<br>
&gt; But I was wondering, whether using the int built-in function it could be written in a better/easier way.<br>
<br>
Not directly: int() does exactly what its name says and converts the annotated string to an integer if possible.  In this case, you&#39;ll probably always get a 0 result.<br>
<br>
However, you could convert your annotations to fixed-point representation, e.g. multiply by 1000 and round to integer for three decimal digits of precision.  So e.g. 0.3 would be stored as the string &quot;300&quot; in your s-attribute.<br>
<br>
Then your query translates to<br>
<br>
        &lt;s&gt; [int(_.s_sent_quality_score) &gt;= 100 &amp; int(_.s_sent_quality_score) &lt; 400]<br>
<br>
Best,<br>
Stephanie<br>
<br>
</blockquote></div>