<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@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;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        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;
        mso-fareast-language:EN-GB;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">&gt;&gt;</span><span style="color:black"> By the &quot;&amp;&quot;operation&nbsp; in the query [pos=&quot;N.*&quot; &amp; f(word)&gt;100], it is supposed that both conditions on the right and left are
 to be satisfied. That is, the result should only return any word that is BOTH noun AND with frequency greater than 100 AS NOUN.</span><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">This is a misunderstanding of the logic. Yes, the &amp; requires that both sides of the &amp; be satisfied. But they do not affect one another.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">So the right side is not “AND with frequency greater than 100 AS NOUN”. There is nothing on the right hand side that says “AS NOUN”. f(word) just refers to
 the frequency of that word form in the lexicon. The referent of the symbol “word” is not altered by anything on the left hand side.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">More broadly, if a wordform &nbsp;occurs 101 times in your corpus, f(word) will always evaluate to 101, regardless of what else is going on elsewhere in a given
 CQP query. The f() function pulls information form the lexicon, it does not perform a count on the fly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">If you want to test the frequency of word-and-pos combinations, then you would have to set up a separate word-and-pos combination column, and apply the f()
 function to <i>that</i>.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">So, in short, it looks like you have the correct behaviour on this front.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">best<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Andrew.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> cwb-bounces@sslmit.unibo.it [mailto:cwb-bounces@sslmit.unibo.it]
<b>On Behalf Of </b>(Ray) WU Liangping<br>
<b>Sent:</b> 06 October 2015 10:05<br>
<b>To:</b> Open source development of the Corpus WorkBench<br>
<b>Subject:</b> Re: [CWB] Does CQPweb support dynamic attributes now?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">&gt;&gt; Well, for illustration of &quot;not really executed&quot;, let's take the query [pos=&quot;N.*&quot; &amp; f(word)&gt;100] on the Brown corpus for example, which returns 90,211 matches.
 In comparison, resetting 100 to 1000 in the previous query returns 7,205 matches (all experimented with BFSU CQPweb). This fact shows that the f() function does work. However, further &quot;Frequency breakdown&quot; reveals that even words with a single occurrence are
 in the final result set, an evidence that the f() function is not really respected (at least in some operations within CQPweb).
<o:p></o:p></span></p>
<pre><span style="color:black">&gt;<o:p>&nbsp;</o:p></span></pre>
<pre><span style="color:black">&gt;Those are probably word forms that occur more than 100 times in the corpus, but aren't always tagged as nouns.&nbsp; When I try your query on the brown family, I find words like<o:p></o:p></span></pre>
<pre><span style="color:black">&gt;<o:p>&nbsp;</o:p></span></pre>
<pre><span style="color:black">&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; perfect<o:p></o:p></span></pre>
<pre><span style="color:black">&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unemployed<o:p></o:p></span></pre>
<pre><span style="color:black">&gt;<o:p>&nbsp;</o:p></span></pre>
<div>
<pre><span style="color:black">&gt;at the end of the frequency ranking, which are infrequently used as nouns.<o:p></o:p></span></pre>
</div>
<div>
<pre><span style="color:black"><o:p>&nbsp;</o:p></span></pre>
</div>
<div>
<pre><span style="color:black">hi Stefan,<o:p></o:p></span></pre>
</div>
<div>
<pre><span style="color:black"><o:p>&nbsp;</o:p></span></pre>
</div>
<div>
<pre><span style="color:black">Although I do not find &quot;perfect&quot; and &quot;unemployed&quot; in the result set (I used just Brown instead of the whole Brown family), I do find the phenomenon you mentioned. For instance, the last word in the list by &quot;Frequency breakdown&quot; is &quot;over&quot;, which was incorrectly tagged as NN1 (once only) and its frequency in&nbsp; the whole corpus is 1,234 (case&nbsp;ignored). That might explain its appearance in the result set.<o:p></o:p></span></pre>
</div>
<div>
<pre><span style="color:black"><o:p>&nbsp;</o:p></span></pre>
</div>
<div>
<pre><span style="color:black">But there comes another question - By the &quot;&amp;&quot;operation&nbsp; in the query [pos=&quot;N.*&quot; &amp; f(word)&gt;100], it is supposed that both conditions on the right and left are to be satisfied. That is, the result should only return any word that is BOTH noun AND with frequency greater than 100 AS NOUN. But now the query seems to first check whether the word is a noun, then check its frequency in the whole corpus (instead of its frequency as noun). This creates some confusion in me, as I understand that the &quot;&amp;&quot; operation is non-directional (but now it is carried out from left to right, one way only). Have I missed anything here? <o:p></o:p></span></pre>
</div>
<div>
<pre><span style="color:black"><o:p>&nbsp;</o:p></span></pre>
</div>
<div>
<pre><span style="color:black">Since the dynamic attribute is slow, I can now understand its removal. Thanks for your suggestion for implementing the semantic restriction as a p-attribute.<o:p></o:p></span></pre>
</div>
<div>
<pre><span style="color:black"><o:p>&nbsp;</o:p></span></pre>
</div>
<div>
<pre><span style="color:black">Best,<o:p></o:p></span></pre>
</div>
<div>
<pre><span style="color:black">Liangping<o:p></o:p></span></pre>
</div>
</div>
</div>
</body>
</html>