<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 26, 2016 at 12:18 PM, Hardie, Andrew <span dir="ltr">&lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt;</span> wrote:</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB">
<div><span class="gmail-">
<p class="gmail-MsoNormal"><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">&gt;&gt;&gt;</span> But how do I restrict searches using the s-attributes (say, speaker sex)? When I do a query and then select &quot;Distribution&quot;, for example, I&#39;m told
 that &quot;This corpus has no text-classification metadata, so the distribution cannot be shown&quot;.<span style="color:rgb(31,73,125);font-family:verdana,sans-serif;font-size:10pt"> </span></p>
</span><p><u></u><span style="font-size:10pt;font-family:symbol;color:rgb(31,73,125)"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&quot;times new roman&quot;">        
</span></span></span><u></u><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Go to Restricted query<u></u><u></u></span></p>
<p><u></u><span style="font-size:10pt;font-family:symbol;color:rgb(31,73,125)"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&quot;times new roman&quot;">        
</span></span></span><u></u><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">You should see options to restrict your query to XML segments where the given attribute has a particular category handle for any s-att that you set
 to datatype “Classifcation”</span></p></div></div></blockquote><div>Thanks. That makes sense.</div><div><br></div><div>When I run one of these queries, though, CQPweb throws an SQL error (pasted below).</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="EN-GB"><div><p><span style="font-size:10pt;font-family:symbol;color:rgb(31,73,125)"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&quot;times new roman&quot;">        
</span></span></span><u></u><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">OR, go to “Create / edit subcorpora” and define subcorpora using the same control, then use those SCs as restriction criteria.</span></p></div></div></blockquote><div>This also throws an error (also pasted below).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="EN-GB"><p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="gmail-MsoNormal"><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"><u></u> </span><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Note that non-text-based corpus restrictions and subcorpora aren’t currently supported in the Distribution display. I know this is a pain, and it’s high on
 my feature list. (but quite a big job so can’t be done quickly!)<u></u><u></u></span><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"><u></u> </span></p></div></blockquote><div>I can only imagine! </div><div><br></div><div>Thanks again,</div><div>Scott</div><div><br></div><div><br></div><div><br></div><div><font face="monospace, monospace">===== ERROR 1 =====</font></div><div><font face="monospace, monospace"><div><font size="1">CQPweb encountered an error and could not continue.</font></div><div><font size="1">A MySQL query did not run successfully!</font></div><div><font size="1"><br></font></div><div><font size="1">Original query: SELECT count(*), sum(words) FROM text_metadata_for_test_coscach WHERE /* from User: user | Function: do_append_mysql_comment() | 2016-Jul-26 16:42:47 */</font></div><div><font size="1"><br></font></div><div><font size="1">Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39; at line 2</font></div><div><font size="1"><br></font></div><div><font size="1">PHP debugging backtrace</font></div><div><font size="1"><br></font></div><div><font size="1">array(7) {</font></div><div><font size="1">  [1]=&gt;</font></div><div><font size="1">  array(4) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(40) &quot;/var/www/html/cqpweb/lib/library.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(282)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(20) &quot;exiterror_mysqlquery&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(3) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;int(1064)</font></div><div><font size="1">      [1]=&gt;</font></div><div><font size="1">      &amp;string(146) &quot;You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39; at line 2&quot;</font></div><div><font size="1">      [2]=&gt;</font></div><div><font size="1">      &amp;string(156) &quot;SELECT count(*), sum(words) FROM text_metadata_for_test_coscach WHERE   </font></div><div><font size="1"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>/* from User: user | Function: do_append_mysql_comment() | 2016-Jul-26 16:42:47 */&quot;</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [2]=&gt;</font></div><div><font size="1">  array(4) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(42) &quot;/var/www/html/cqpweb/lib/subcorpus.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(1556)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(14) &quot;do_mysql_query&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(1) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;string(71) &quot;SELECT count(*), sum(words) FROM text_metadata_for_test_coscach WHERE  &quot;</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [3]=&gt;</font></div><div><font size="1">  array(7) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(42) &quot;/var/www/html/cqpweb/lib/subcorpus.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(1214)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(15) &quot;initialise_size&quot;</font></div><div><font size="1">    [&quot;class&quot;]=&gt;</font></div><div><font size="1">    string(11) &quot;Restriction&quot;</font></div><div><font size="1">    [&quot;object&quot;]=&gt;</font></div><div><font size="1">    object(Restriction)#14 (15) {</font></div><div><font size="1">      [&quot;serialised&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      string(26) &quot;$^text|location~concepcion&quot;</font></div><div><font size="1">      [&quot;parsed_conditions&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      array(1) {</font></div><div><font size="1">        [&quot;text&quot;]=&gt;</font></div><div><font size="1">        array(1) {</font></div><div><font size="1">          [0]=&gt;</font></div><div><font size="1">          string(19) &quot;location~concepcion&quot;</font></div><div><font size="1">        }</font></div><div><font size="1">      }</font></div><div><font size="1">      [&quot;stored_text_metadata_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;stored_idlink_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;cpos_collection&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;corpus&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      string(12) &quot;test_coscach&quot;</font></div><div><font size="1">      [&quot;item_type&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      string(4) &quot;text&quot;</font></div><div><font size="1">      [&quot;n_items&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;n_tokens&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;freqtable_record&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;hasrun_initialise_text_metadata_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;hasrun_initialise_idlink_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;hasrun_initialise_cpos_collection&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;hasrun_initialise_size&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;needs_to_be_added_to_cache&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">    }</font></div><div><font size="1">    [&quot;type&quot;]=&gt;</font></div><div><font size="1">    string(2) &quot;-&gt;&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(0) {</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [4]=&gt;</font></div><div><font size="1">  array(6) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(42) &quot;/var/www/html/cqpweb/lib/subcorpus.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(670)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(12) &quot;new_from_url&quot;</font></div><div><font size="1">    [&quot;class&quot;]=&gt;</font></div><div><font size="1">    string(11) &quot;Restriction&quot;</font></div><div><font size="1">    [&quot;type&quot;]=&gt;</font></div><div><font size="1">    string(2) &quot;::&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(2) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;string(85) &quot;theData=gente&amp;qmode=sq_nocase&amp;pp=50&amp;del=begin&amp;t=text|location~concepcion&amp;del=end&amp;uT=y&quot;</font></div><div><font size="1">      [1]=&gt;</font></div><div><font size="1">      &amp;bool(true)</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [5]=&gt;</font></div><div><font size="1">  array(7) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(42) &quot;/var/www/html/cqpweb/lib/subcorpus.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(589)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(14) &quot;parse_from_url&quot;</font></div><div><font size="1">    [&quot;class&quot;]=&gt;</font></div><div><font size="1">    string(10) &quot;QueryScope&quot;</font></div><div><font size="1">    [&quot;object&quot;]=&gt;</font></div><div><font size="1">    object(QueryScope)#15 (4) {</font></div><div><font size="1">      [&quot;type&quot;]=&gt;</font></div><div><font size="1">      int(0)</font></div><div><font size="1">      [&quot;restriction&quot;:&quot;QueryScope&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;subcorpus&quot;:&quot;QueryScope&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;serialised&quot;:&quot;QueryScope&quot;:private]=&gt;</font></div><div><font size="1">      string(0) &quot;&quot;</font></div><div><font size="1">    }</font></div><div><font size="1">    [&quot;type&quot;]=&gt;</font></div><div><font size="1">    string(2) &quot;-&gt;&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(2) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;string(89) &quot;theData=gente&amp;qmode=sq_nocase&amp;pp=50&amp;del=begin&amp;t=text%7Clocation%7Econcepcion&amp;del=end&amp;uT=y&quot;</font></div><div><font size="1">      [1]=&gt;</font></div><div><font size="1">      &amp;bool(true)</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [6]=&gt;</font></div><div><font size="1">  array(6) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(44) &quot;/var/www/html/cqpweb/lib/concordance.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(156)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(12) &quot;new_from_url&quot;</font></div><div><font size="1">    [&quot;class&quot;]=&gt;</font></div><div><font size="1">    string(10) &quot;QueryScope&quot;</font></div><div><font size="1">    [&quot;type&quot;]=&gt;</font></div><div><font size="1">    string(2) &quot;::&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(2) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;string(89) &quot;theData=gente&amp;qmode=sq_nocase&amp;pp=50&amp;del=begin&amp;t=text%7Clocation%7Econcepcion&amp;del=end&amp;uT=y&quot;</font></div><div><font size="1">      [1]=&gt;</font></div><div><font size="1">      &amp;bool(true)</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [7]=&gt;</font></div><div><font size="1">  array(4) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(40) &quot;/var/www/html/cqpweb/exe/concordance.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(1)</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(1) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      string(44) &quot;/var/www/html/cqpweb/lib/concordance.inc.php&quot;</font></div><div><font size="1">    }</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(7) &quot;require&quot;</font></div><div><font size="1">  }</font></div><div><font size="1">}</font></div><div><br></div></font></div><div><font face="monospace, monospace">===== ERROR 2 =====</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace"><div><font size="1">CQPweb encountered an error and could not continue.</font></div><div><font size="1">A MySQL query did not run successfully!</font></div><div><font size="1"><br></font></div><div><font size="1">Original query: SELECT count(*), sum(words) FROM text_metadata_for_test_coscach WHERE /* from User: user | Function: do_append_mysql_comment() | 2016-Jul-26 16:49:17 */</font></div><div><font size="1"><br></font></div><div><font size="1">Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39; at line 2</font></div><div><font size="1"><br></font></div><div><font size="1"> </font></div><div><font size="1">PHP debugging backtrace</font></div><div><font size="1"><br></font></div><div><font size="1">array(5) {</font></div><div><font size="1">  [1]=&gt;</font></div><div><font size="1">  array(4) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(40) &quot;/var/www/html/cqpweb/lib/library.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(282)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(20) &quot;exiterror_mysqlquery&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(3) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;int(1064)</font></div><div><font size="1">      [1]=&gt;</font></div><div><font size="1">      &amp;string(146) &quot;You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39; at line 2&quot;</font></div><div><font size="1">      [2]=&gt;</font></div><div><font size="1">      &amp;string(156) &quot;SELECT count(*), sum(words) FROM text_metadata_for_test_coscach WHERE   </font></div><div><font size="1"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>/* from User: user | Function: do_append_mysql_comment() | 2016-Jul-26 16:49:17 */&quot;</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [2]=&gt;</font></div><div><font size="1">  array(4) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(42) &quot;/var/www/html/cqpweb/lib/subcorpus.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(1556)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(14) &quot;do_mysql_query&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(1) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;string(71) &quot;SELECT count(*), sum(words) FROM text_metadata_for_test_coscach WHERE  &quot;</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [3]=&gt;</font></div><div><font size="1">  array(7) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(42) &quot;/var/www/html/cqpweb/lib/subcorpus.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(1214)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(15) &quot;initialise_size&quot;</font></div><div><font size="1">    [&quot;class&quot;]=&gt;</font></div><div><font size="1">    string(11) &quot;Restriction&quot;</font></div><div><font size="1">    [&quot;object&quot;]=&gt;</font></div><div><font size="1">    object(Restriction)#16 (15) {</font></div><div><font size="1">      [&quot;serialised&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      string(26) &quot;$^text|location~concepcion&quot;</font></div><div><font size="1">      [&quot;parsed_conditions&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      array(1) {</font></div><div><font size="1">        [&quot;text&quot;]=&gt;</font></div><div><font size="1">        array(1) {</font></div><div><font size="1">          [0]=&gt;</font></div><div><font size="1">          string(19) &quot;location~concepcion&quot;</font></div><div><font size="1">        }</font></div><div><font size="1">      }</font></div><div><font size="1">      [&quot;stored_text_metadata_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;stored_idlink_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;cpos_collection&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;corpus&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      string(12) &quot;test_coscach&quot;</font></div><div><font size="1">      [&quot;item_type&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      string(4) &quot;text&quot;</font></div><div><font size="1">      [&quot;n_items&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;n_tokens&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;freqtable_record&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      NULL</font></div><div><font size="1">      [&quot;hasrun_initialise_text_metadata_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;hasrun_initialise_idlink_where&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;hasrun_initialise_cpos_collection&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;hasrun_initialise_size&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">      [&quot;needs_to_be_added_to_cache&quot;:&quot;Restriction&quot;:private]=&gt;</font></div><div><font size="1">      bool(false)</font></div><div><font size="1">    }</font></div><div><font size="1">    [&quot;type&quot;]=&gt;</font></div><div><font size="1">    string(2) &quot;-&gt;&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(0) {</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [4]=&gt;</font></div><div><font size="1">  array(6) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(48) &quot;/var/www/html/cqpweb/lib/subcorpus-admin.inc.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(128)</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(12) &quot;new_from_url&quot;</font></div><div><font size="1">    [&quot;class&quot;]=&gt;</font></div><div><font size="1">    string(11) &quot;Restriction&quot;</font></div><div><font size="1">    [&quot;type&quot;]=&gt;</font></div><div><font size="1">    string(2) &quot;::&quot;</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(1) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      &amp;string(178) &quot;subcorpusNewName=concepcion&amp;action=Create+subcorpus+from+selected+categories&amp;scriptMode=create_from_metadata&amp;thisQ=subcorpus&amp;del=begin&amp;t=text%7Clocation%7Econcepcion&amp;del=end&amp;uT=y&quot;</font></div><div><font size="1">    }</font></div><div><font size="1">  }</font></div><div><font size="1">  [5]=&gt;</font></div><div><font size="1">  array(4) {</font></div><div><font size="1">    [&quot;file&quot;]=&gt;</font></div><div><font size="1">    string(44) &quot;/var/www/html/cqpweb/exe/subcorpus-admin.php&quot;</font></div><div><font size="1">    [&quot;line&quot;]=&gt;</font></div><div><font size="1">    int(1)</font></div><div><font size="1">    [&quot;args&quot;]=&gt;</font></div><div><font size="1">    array(1) {</font></div><div><font size="1">      [0]=&gt;</font></div><div><font size="1">      string(48) &quot;/var/www/html/cqpweb/lib/subcorpus-admin.inc.php&quot;</font></div><div><font size="1">    }</font></div><div><font size="1">    [&quot;function&quot;]=&gt;</font></div><div><font size="1">    string(7) &quot;require&quot;</font></div><div><font size="1">  }</font></div><div><font size="1">}</font></div><div><br></div></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="EN-GB"><div>

<p class="gmail-MsoNormal"><b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif"> <a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a>]
<b>On Behalf Of </b>Scott Sadowsky<br>
<b>Sent:</b> 26 July 2016 17:12</span></p><div><div class="gmail-h5"><br>
<b>To:</b> Open source development of the Corpus WorkBench<br>
<b>Cc:</b> Open source development of the Corpus WorkBench<br>
<b>Subject:</b> Re: [CWB] WebInABox: Can&#39;t import existing corpora from host<u></u><u></u></div></div><p></p><div><div class="gmail-h5">
<p class="gmail-MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="gmail-MsoNormal">On Tue, Jul 26, 2016 at 7:25 AM, Hardie, Andrew &lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt; wrote:<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">Hi Andrew,<u></u><u></u></p>
</div>
<div>
<blockquote style="border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-style:none none none solid;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">I have had a dig, and found the bug (it was a regex glitch parsing the inserted registry file). Update the code to rev 880 and you should find that the
 system will obediently detect your s-attributes. (You will still, naturally, need to go through the first step that IO mentioned,  of making sure all data from earlier passes is properly scrubbed.)</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="gmail-MsoNormal">Eureka - with this new rev CQPweb now imports my XML metadata! Thanks so much for hunting this down and fixing it!<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">I&#39;ve now done the following:<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">1. I went through the &quot;Manage Corpus XML&quot; page and set descriptions and data types, defining the attributes I want to be able to search on in queries, subqueries, sub-corpora, etc. to &quot;classification&quot; (e.g. speaker sex and location).<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">2. I went through the &quot;Manage Annotation&quot; page and linked the &quot;Annotation setup for CEQL queries&quot; fields to the various annotation data in my corpus.<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">3. On the &quot;Manage frequency lists&quot; page I (re)generated everything (I&#39;ve attached the metadata table from mysql below).<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">I can now perform queries, and my metadata is recognized. But how do I restrict searches using the s-attributes (say, speaker sex)? When I do a query and then select &quot;Distribution&quot;, for example, I&#39;m told that &quot;This corpus has no text-classification
 metadata, so the distribution cannot be shown&quot;.<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">Thanks!<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal">Scott<u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">mysql&gt; select * from xml_metadata;</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">+----+--------------+-----------------+------------+-----------------------------------+----------+</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| id | corpus       | handle          | att_family | description                       | datatype |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">+----+--------------+-----------------+------------+-----------------------------------+----------+</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  1 | bncsampler   | s               | s          | s                                 |        0 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  2 | bncsampler   | text            | text       | text                              |        0 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  3 | bncsampler   | text_id         | text       | text_id                           |        3 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  4 | lcmc         | s               | s          | s                                 |        0 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  5 | lcmc         | text            | text       | text                              |        0 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  6 | lcmc         | text_id         | text       | text_id                           |        3 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  7 | test_coscach | s               | s          | Sentence                          |        0 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  8 | test_coscach | text            | text       | Text                              |        0 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  9 | test_coscach | text_id         | text       | Unique Text ID                    |        3 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 10 | test_coscach | text_corpus     | text       | Corpus name                       |        2 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 11 | test_coscach | text_tagger     | text       | Corpus tagger                     |        2 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 12 | test_coscach | text_language   | text       | Text language                     |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 13 | test_coscach | text_channel    | text       | Spoken or written?                |        2 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 14 | test_coscach | text_instrument | text       | Elicitation instrument            |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 15 | test_coscach | text_lingualism | text       | Speaker monolingual or bilingual? |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:10pt;font-family:&quot;courier new&quot;">| 16 | test_coscach | text_location   | text       | Speaker location                  |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 17 | test_coscach | text_sex        | text       | Speaker sex                       |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 18 | test_coscach | text_generation | text       | Speaker generation                |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| 19 | test_coscach | text_sel        | text       | Speaker SEL                       |        1 |</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">+----+--------------+-----------------+------------+-----------------------------------+----------+</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">19 rows in set (0.00 sec)</span><u></u><u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="gmail-MsoNormal"><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">mysql&gt; </span><u></u><u></u></p>
</div>
</div>
<div>
<p class="gmail-MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-style:none none none solid;border-top-color:initial;border-right-color:initial;border-bottom-color:initial;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p><u></u> <u></u></p>
<div>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0cm 0cm;border-right-width:initial;border-bottom-width:initial;border-left-width:initial;border-right-color:initial;border-bottom-color:initial;border-left-color:initial">
<p><b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif"> Hardie, Andrew
<br>
<b>Sent:</b> 25 July 2016 23:48<br>
<span><b>To:</b> Open source development of the Corpus WorkBench</span><br>
<b>Subject:</b> RE: [CWB] WebInABox: Can&#39;t import existing corpora from host</span><u></u><u></u></p>
</div>
</div>
<p> <u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">OK, 2 things:</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">First – the result of the MySQL query shows that none of the XML of your corpus has been detected.</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Second – the other error you report is clearly referring to your earlier index data. The check on text ID validity is done at point of extraction
<i>from</i> the index <i>to </i>CQPweb’s internal data structures. So, it is reading the index and getting bad values. This implies that your earelier index files still exist and are being read by CQPweb.</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">So, the overall picture would seem to be that you have data hanging around from previous incarnations of the corpus, and your reinstallation did not work
 properly. Your best bet might be to make doubly sure everything is wiped from that corpus, then start over again. This will probably not fix all the problems but it
<i>should</i> make the issues that remain clearer.</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">best</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Andrew.</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">
<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a>]
<b>On Behalf Of </b>Scott Sadowsky<br>
<span><b>Sent:</b> 25 July 2016 17:15</span></span><u></u><u></u></p>
<div>
<div>
<p class="gmail-MsoNormal"><b>To:</b> Open source development of the Corpus WorkBench<br>
<b>Cc:</b> Open source development of the Corpus WorkBench<br>
<b>Subject:</b> Re: [CWB] WebInABox: Can&#39;t import existing corpora from host<u></u><u></u></p>
</div>
</div>
<div>
<div>
<p> <u></u><u></u></p>
<div>
<div>
<div>
<p>On Mon, Jul 25, 2016 at 5:48 AM, Hardie, Andrew &lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt; wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<p> <u></u><u></u></p>
<div>
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Try running</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">          select * from xml_metadata;</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">in the MySQL command line client, and see what you get.</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>This is what I get:<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">$ mysql -u root -p cqpweb</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">Enter password: </span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">Reading table information for completion of table and column names</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">[...]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">mysql&gt; select * from xml_metadata;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">+----+------------+---------+------------+-------------+----------+</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">| id | corpus     | handle  | att_family | description | datatype |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">+----+------------+---------+------------+-------------+----------+</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  1 | bncsampler | s       | s          | s           |        0 |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  2 | bncsampler | text    | text       | text        |        0 |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  3 | bncsampler | text_id | text       | text_id     |        3 |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  4 | lcmc       | s       | s          | s           |        0 |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  5 | lcmc       | text    | text       | text        |        0 |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">|  6 | lcmc       | text_id | text       | text_id     |        3 |</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">+----+------------+---------+------------+-------------+----------+</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">6 rows in set (0.00 sec)</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">mysql&gt; </span><u></u><u></u></p>
</div>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>I have noted something anomalous on another front which may be relevant. When I go to the &quot;Manage Metadata&quot; page of the corpus I&#39;m trying to get set up, and hit the &quot;Create minimalist metadata table&quot; button, I get an error which has
 nothing to do with my current corpus:<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">The data source you specified for the text metadata contains badly-formatted text ID codes, as follows: &lt;strong&gt; &#39;&lt;no annotation&gt;&#39;; &#39;CCN-F2-01_Ca_St.ortografica.txt&#39;; &#39;CCN-F2-02_D_StB.ortografica.txt&#39;;
 &#39;CCN-F2-03_Ca_St.ortografica.txt&#39;; &#39;CCN-F2-04_Cb_St.ortografica.txt&#39;;[...]&lt;/strong&gt; (text ids can only contain unaccented letters, numbers, and underscore).</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>None of these values are present in my current corpus, though they
<i>were</i> in an earlier version, However, I removed them from the tagged texts after you explained that these values had to be handles. Here&#39;s what my metadata currently looks like:<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">&lt;text id=&quot;CCN_F2_27_B&quot; corpus=&quot;coscach&quot; tagger=&quot;freeling_xml&quot; language=&quot;spanish&quot; channel=&quot;oral&quot; instrument=&quot;interview&quot; lingualism=&quot;monolingual&quot; location=&quot;concepcion&quot; sex=&quot;f&quot;
 generation=&quot;G2&quot; sel=&quot;B&quot;&gt;</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>So values like <span style="font-size:10pt;font-family:&quot;courier new&quot;">&#39;CCN-F2-01_Ca_St.ortografica.txt&#39;</span> are not in my corpus any more (and I recompiled it from these files, of course), but they seem to be cached somewhere
 by CQPweb, and they are not getting updated by newer corpora I try to import. (Note that I&#39;ve used different names, e.g. test_corpus, test_corpus_two, in order to try to get around this, but it hasn&#39;t worked).<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>Cheers,<br>
Scott<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<div>
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">best</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Andrew.</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">
<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a>]
<b>On Behalf Of </b>Scott Sadowsky<br>
<b>Sent:</b> 24 July 2016 17:17<br>
<b>To:</b> Open source development of the Corpus WorkBench<br>
<b>Cc:</b> Open source development of the Corpus WorkBench<br>
<b>Subject:</b> Re: [CWB] WebInABox: Can&#39;t import existing corpora from host</span><u></u><u></u></p>
<div>
<div>
<p> <u></u><u></u></p>
<div>
<div>
<div>
<p>On Sun, Jul 24, 2016 at 11:29 AM, Hardie, Andrew &lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt; wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<p> <u></u><u></u></p>
<div>
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">First point – your text ID codes won’t work, they need to be
<b>handles</b>, i.e. just ASCII letters, numbers, and underscore – no hyphens/full stops.</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>Now corrected!<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<div>
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Second point – the various s-attributes text_corpus , text_tagger etc. need (a) to exist in the registry – did your correction fix this? (b) CQPweb needs
 to have logged their existence – if it’s saying “No XML annotations found” that suggests it hasn’t, which could be a consequence of (a), or could be a bug.</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>Unless I&#39;m mistaken about what attributes are what, they are indeed in the registry. I&#39;ve pasted it at the end of this e-mail, along with a single tagged source text sentence.<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">There was in fact a bug with s-attributes in the registry failing to be detected which I fixed a few months back: I cannot recall if that was before or
 after the version of the code in the VM image. If you want to rule this out, connect the VM’s networking, upgrade CQPweb to the latest version from SVN (don’t forget to do the database upgrade!), and try again: if that fixes it, it was the old bug.</span><u></u><u></u></p>
</div>
</blockquote>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>I&#39;ve been using revision 879 (3.2.20) the whole time, so it shouldn&#39;t be the old bug. <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">Once CQPweb is aware of your XML attributes you should be able to use them to derive text metadata. </span><u></u><u></u></p>
</div>
</blockquote>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>Thanks for your patience!<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>Cheers,<u></u><u></u></p>
</div>
<div>
<p>Scott<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">&lt;text id=&quot;CCN_F2_25_Ca&quot; corpus=&quot;test_two&quot; tagger=&quot;freeling_xml&quot; language=&quot;spanish&quot; channel=&quot;oral&quot; instrument=&quot;interview&quot; lingualism=&quot;monolingual&quot; location=&quot;concepcion&quot; sex=&quot;f&quot;
 generation=&quot;G2&quot; sel=&quot;Ca&quot;&gt;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">&lt;s&gt;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">¿       ¿       Fia     Fia     punctuation     questionmark</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">todavía todavía RG      RG      adverb  general</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">está    estar   VAIP3S0 VAI     verb    auxiliary</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">grabando        grabar  VMG0000 VMG     verb    main</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">?       ?       Fit     Fit     punctuation     questionmark</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">&lt;/s&gt;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">&lt;/text&gt;</span><u></u><u></u></p>
</div>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">## registry entry for corpus TEST_TWO</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># long descriptive name for the corpus</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">NAME &quot;&quot;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># corpus ID (must be lowercase in registry!)</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ID   test_two</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># path to binary data files</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">HOME /var/cqpweb/index/test_two</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># optional info file (displayed by &quot;info;&quot; command in CQP)</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">INFO /var/cqpweb/index/test_two/.info</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># corpus properties provide additional information about the corpus:</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##:: charset  = &quot;utf8&quot; # character encoding of corpus data</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##:: language = &quot;es&quot;     # insert ISO code for language (de, en, fr, ...)</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">## p-attributes (token annotations)</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ATTRIBUTE word</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ATTRIBUTE lemma</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ATTRIBUTE tag</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ATTRIBUTE ctag</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ATTRIBUTE pos</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">ATTRIBUTE type</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">## s-attributes (structural markup)</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">##</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># &lt;s&gt; ... &lt;/s&gt;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># (no recursive embedding allowed)</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE s</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># &lt;text id=&quot;..&quot; corpus=&quot;..&quot; tagger=&quot;..&quot; file=&quot;..&quot; language=&quot;..&quot; channel=&quot;..&quot; instrument=&quot;..&quot; lingualism=&quot;..&quot; location=&quot;..&quot; sex=&quot;..&quot; generation=&quot;..&quot; sel=&quot;..&quot;&gt; ... &lt;/text&gt;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># (no recursive embedding allowed)</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_id              # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_corpus          # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_tagger          # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_file            # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_language        # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_channel         # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_instrument      # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_lingualism      # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:10pt;font-family:&quot;courier new&quot;">STRUCTURE text_location        # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_sex             # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_generation      # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;">STRUCTURE text_sel             # [annotations]</span><u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-size:7.5pt;font-family:&quot;courier new&quot;"># Yours sincerely, the Encode tool.</span><u></u><u></u></p>
</div>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<div>
<div>
<p><b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:tahoma,sans-serif">
<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@liste.sslmit.unibo.it" target="_blank">cwb-bounces@liste.sslmit.unibo.it</a>]
<b>On Behalf Of </b>Scott Sadowsky<br>
<b>Sent:</b> 24 July 2016 15:52<br>
<b>To:</b> CWBdev Mailing List</span><u></u><u></u></p>
<div>
<div>
<p><br>
<b>Subject:</b> [CWB] WebInABox: Can&#39;t import existing corpora from host<u></u><u></u></p>
</div>
</div>
<div>
<div>
<p> <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<p>On Sun, Jul 24, 2016 at 10:19 AM, Hardie, Andrew &lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt; wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-top-width:initial;border-right-width:initial;border-bottom-width:initial;border-top-color:initial;border-right-color:initial;border-bottom-color:initial">
<p> <u></u><u></u></p>
<div>
<div>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">CQPweb requires all corpora to have at least one &lt;text&gt; element, and every text element has to have an id i.e. everything within the corpus has to be
 contained within a sequence of one or more</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)"> </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">&lt;text id=”somethinghere”&gt;</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">…</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(31,73,125)">&lt;/text&gt;</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>Thanks, Andrew. It turns out the problem was that I had been using the name &quot;id&quot; instead of &quot;text&quot; for the element. Now that I&#39;ve changed that, I was able to successfully create the corpus in CQPweb.<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>My source files have quite a bit of metadata, which I&#39;ve encoded as follows:<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p><span style="font-family:&quot;courier new&quot;">&lt;<span style="color:red">text</span>
<span style="color:rgb(56,118,29)">id</span>=&quot;CCN-F2-02_D_StB.ortografica.txt&quot; <span style="color:rgb(56,118,29)">
corpus</span>=&quot;test&quot; <span style="color:rgb(56,118,29)">tagger</span>=&quot;freeling-xml&quot; <span style="color:rgb(56,118,29)">
language</span>=&quot;spanish&quot; <span style="color:rgb(56,118,29)">location</span>=&quot;concepcion&quot;
<span style="color:rgb(56,118,29)">sex</span>=&quot;f&quot;&gt;</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-family:&quot;courier new&quot;">...</span><u></u><u></u></p>
</div>
<div>
<p><span style="font-family:&quot;courier new&quot;">&lt;/text&gt;</span><u></u><u></u></p>
</div>
<p><br>
I&#39;m now at the CQPweb &quot;Design and insert a text-metadata table for the corpus&quot; page, but it tells me that &quot;No XML annotations found for this corpus&quot;. Is there something wrong with how I did the encoding above? I can use all of these XML elements in cqp searches
 directly, but here they aren&#39;t recognized.<u></u><u></u></p>
</div>
<div>
<p> <u></u><u></u></p>
</div>
<div>
<p>(I&#39;ve checked chapter 6 of the manual, to no avail).<u></u><u></u></p>
</div>
<div>
<p><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@liste.sslmit.unibo.it">CWB@liste.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>
<br></blockquote></div><br><br clear="all"><div><br></div>
</div></div>