<font color="#333399"><font face="tahoma,sans-serif">Hi Andrew, <br><br>Re-generating the meta-tables did the job, and now search is also working!<br><br>re cqpweb 2.13 - is this available from sourceforge? I only see 2.12 (which is the one I used).  or this is not an official release as yet?<br>

<br>Thanks <br>claudia<br></font></font><br><div class="gmail_quote">On 26 July 2010 03:44, Hardie, Andrew <span dir="ltr">&lt;<a href="mailto:a.hardie@lancaster.ac.uk">a.hardie@lancaster.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">










<div link="blue" vlink="purple" lang="EN-GB">

<div>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Hi Claudia,</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Apologies for the delay replying; I have been off email. I’ll
take your original email and updates in reverse order, and answer queries even
if you answered them yourself later – just in case the answers are useful for
others.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">“</span>Corpus ``EXAMPLESIMPLE&#39;&#39; is undefined<span style="font-size: 10pt; color: rgb(0, 32, 96);">”</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">An error like this does indeed indicate that the problem was at
the corpus-indexing stage.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">On how to tell whether a corpus has been created or not:</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">“</span><span style="color: rgb(51, 51, 153);">When using the terminal version, cwb-encode and cwb-make create
a bunch of additional files....but I am not seeing this happening in the web
version - how can I check this?</span><span style="font-size: 10pt; color: rgb(0, 32, 96);">”</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">These files are placed in the registry and data directories that
are specified in your configuration file (<b>lib/config.inc.php</b>). The
variables are $cwb_registry and $cwb_datadir. The registry files are placed in
the former; a directory of actual index files per corpus in the latter. These
are outside the normal web directory (/var/www or whatever) so that random
browsers don’t have access to the internal workings of your CWB setup! The PHP
files created in the web directory are just pointers to different bits of the interface.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">“</span><span style="color: rgb(51, 51, 153);">mkdir($datadir, 0775); - this is not working for me, and infact
my /corpora/data/ is empty, when it should have the folder &#39;examplesimple&#39; in
it</span><span style="font-size: 10pt; color: rgb(0, 32, 96);">”<b></b></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">As you later worked out, this is a permissions problem. The
setup manual puts it as follows:</span></p>

<p class="MsoNormal" style="margin-left: 36pt;"><span><span style="font-size: 10pt; color: black;">The username of the webserver (in the case
of Apache, usually something like</span></span><span><span style="font-size: 10pt; color: black;"> </span></span><span><b><span style="font-size: 10pt; color: black;">www</span></b></span><span><span style="font-size: 10pt; color: black;"> </span></span><span><span style="font-size: 10pt; color: black;">or</span></span><span><span style="font-size: 10pt; color: black;"> </span></span><span><b><span style="font-size: 10pt; color: black;">www-data</span></b></span><span><span style="font-size: 10pt; color: black;">) need to
have read-write-execute access to all these directories [that is, the ones you
create for CQPweb]. The username of the mysqld process (usually something like</span></span><span><span style="font-size: 10pt; color: black;"> </span></span><span><b><span style="font-size: 10pt; color: black;">mysql</span></b></span><span><span style="font-size: 10pt; color: black;">) also needs
read and write access if you want MySQL to use file-access functions. So, these
new folders</span></span><span><span style="font-size: 10pt; color: black;"> </span></span><span><i><span style="font-size: 10pt; color: black;">must</span></i></span><span><span style="font-size: 10pt; color: black;"> </span></span><span><span style="font-size: 10pt; color: black;">have the
write permission set for either “all” or – if you are worried about security –
for “group” (where the file is assigned to some group that both the mysql
server&#39;s account and the web server&#39;s account belong to).</span></span><span style="font-size: 10pt; color: rgb(0, 32, 96);"></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">“</span><span style="color: rgb(51, 51, 153);">function create_text_metadata_for_minimalist() contains the call
to:     create_text_metadata_check_text_ids($corpus); however
$corpus is an empty string and so this was resulting in an sql error</span><span style="font-size: 10pt; color: rgb(0, 32, 96);">”</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Yes, this is a bug in v2.12; it was fixed in 2.13. The solution
was exactly what you thought – change to <b>$corpus_sql_name</b>.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="font-size: 10pt; color: rgb(0, 32, 96);">“</span><span style="color: rgb(51, 51, 153);">if I try say a word
lookup, I get an error:</span></p><div class="im">

<p style="margin-left: 36pt;"><b>Error message</b></p>

<p class="MsoNormal" style="margin-left: 36pt;"><u>Syntax error</u><br>
Sorry, your simple query &#39; f* &#39; contains a syntax error.<br>
Usage: $grammar-&gt;SetParam($name, $value) at - line 10</p>

</div><p class="MsoNormal"><span style="color: rgb(51, 51, 153);">I
will try and find out what&#39;s causing this. any tips?</span><span style="font-size: 10pt; color: rgb(0, 32, 96);">”</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">It looks as if one of two things is not working with regard to
the tertiary annotation and the mapping table. </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><i><span style="font-size: 10pt; color: rgb(0, 32, 96);">EITHER</span></i><span style="font-size: 10pt; color: rgb(0, 32, 96);"> your CEQL setup for this corpus is not correct – though it
should be if you used default p-attributes. Click on “Manage annotation” in the
admin section of the main menu to check this. </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><i><span style="font-size: 10pt; color: rgb(0, 32, 96);">OR</span></i><span style="font-size: 10pt; color: rgb(0, 32, 96);"> the mapping tables that are needed for the query don’t exist. In
the admin interface under “Misc” click on “mapping tables” and then press the
button at the bottom of the screen to regenerate built-in mapping tables.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">(And more on all of this here: </span><a href="http://cwb.svn.sourceforge.net/viewvc/cwb/gui/cqpweb/trunk/doc/CQPweb-CEQL-manual.html" target="_blank">http://cwb.svn.sourceforge.net/viewvc/cwb/gui/cqpweb/trunk/doc/CQPweb-CEQL-manual.html</a>
)<span style="font-size: 10pt; color: rgb(0, 32, 96);"></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">best</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Andrew.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;">

<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a>]
<b>On Behalf Of </b>Claudia Borg<br>
<b>Sent:</b> 23 July 2010 18:04<br>
<b>To:</b> Open source development of the Corpus WorkBench<br>
<b>Subject:</b> Re: [CWB] CQPweb - managing metadata</span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: rgb(51, 51, 153);">[second update]<br>
<br>
apologies for the several emails. <br>
<br>
I have sorted out the php  mkdir problem by setting chmod 777 to the
following directories:<br>
<br>
/corpora/data<br>
/corpora/registry<br>
/corpora/system<br>
/corpora/system/access<br>
/corpora/system/temp<br>
/corpora/system/upload<br>
<br>
That sorted out the reading and writing to those directories. in fact now I see
that there are the corpus files in the directory /corpora/data/examplesimple
showing that at least the input file has been processed.<br>
<br>
Next problem encountered when creating minimalist metadata:<br>
<br>
in admin-lib.inc.php:<br>
<br>
line 1454 (approx, since I added some checks):<br>
<br>
function create_text_metadata_for_minimalist()<br>
<br>
contains the call to:<br>
    create_text_metadata_check_text_ids($corpus);<br>
however $corpus is an empty string and so this was resulting in an sql error.<br>
<br>
I changed this to $corpus_sql_name and it seems to have worked. <br>
<br>
I don&#39;t know if this is actually a bug or not. But it kind of works so
far...still not out of the woods though! the metadata installation seems to be
ok, but if I try say a word lookup, I get an error:</span></p>

<p><b>Error message</b></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><u>Syntax error</u><br>
Sorry, your simple query &#39; f* &#39; contains a syntax error.<br>
Usage: $grammar-&gt;SetParam($name, $value) at - line 10<br>
<span style="color: rgb(51, 51, 153);"><br>
I will try and find out what&#39;s causing this. any tips?<br>
<br>
thanks<br>
Claudia<br>
<br>
<br>
</span></p>

<div>

<p class="MsoNormal">On 23 July 2010 17:22, Claudia Borg &lt;<a href="mailto:claudiaborg@gmail.com" target="_blank">claudiaborg@gmail.com</a>&gt; wrote:</p>

<p class="MsoNormal"><span style="color: rgb(51, 51, 153);">[update]<br>
<br>
as a matter of fact, in the running of admin-lib.inc.php around line 380+ there
is a piece of code mkdir($datadir, 0775); - this is not working for me, and
infact my /corpora/data/ is empty, when it should have the folder
&#39;examplesimple&#39; in it. <br>
<br>
I am running php version 5.3.2-1ubuntu4.2 - I&#39;ll try to check why the directory
is not being created...<br>
</span><span style="color: rgb(136, 136, 136);"><br>
claudia</span></p>

<div>

<div>

<p class="MsoNormal"> </p>

<div>

<p class="MsoNormal">On 23 July 2010 16:35, Claudia Borg &lt;<a href="mailto:claudiaborg@gmail.com" target="_blank">claudiaborg@gmail.com</a>&gt;
wrote:</p>

<p class="MsoNormal"><span style="color: rgb(51, 51, 153);">Hi
Andrew, Thanks for your reply. Some more questions from my side to help me
understand better: <br>
<br>
metadata can be extra information about the corpus (e.g. URL, author) and not
linguistic information present in the text, correct? Linguistic info are the
p-attributes, and the structure of the text (chapters, ect) are the
s-attributes - correct? <br>
<br>
re removing text_id and text_lang - I&#39;ve done that and now getting a different
error :( <br>
<br>
What I did:<br>
placed a new file in the upload section<br>
installed a new corpus using this file leaving default s- and p-attributes<br>
clicked on design and insert a text-metadata table link<br>
left all as is on the form and just clicked the minimalist metadata button at
the bottom - the result is this:</span></p>

<p><b>Error message</b></p>

<p class="MsoNormal" style="margin-bottom: 12pt;">**** CQP ERROR ****<br>
CQP Error:<br>
Corpus ``EXAMPLESIMPLE&#39;&#39; is undefined<br>
<span style="color: rgb(51, 51, 153);"><br>
<br>
<br>
I&#39;ll try to have a look at the code - I suspect that the problem is actually in
the previous step when installing a new corpus - how can I confirm that a
corpus has been indeed installed correctly? At this stage all I notice is that
in my /var/www/ I have a new folder for the corpus, with some php files inside
it - apart from that, I don&#39;t see any other changes. When using the terminal
version, cwb-encode and cwb-make create a bunch of additional files....but I am
not seeing this happening in the web version - how can I check this? ....in the
meantime, help is much appreciated!<br>
<br>
Claudia<br>
<br>
<br>
</span></p>

<div>

<div>

<div>

<p class="MsoNormal">On 21 July 2010 15:44, Hardie, Andrew &lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt;
wrote:</p>

</div>

</div>

<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;">



<div>

<div>

<div>

<div>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Hi Claudia,</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Could you try encoding without the
explicit text_id and text_lang elements in your input file? CQPweb assumes that
input files will be valid XML, and that s-attributes like text_id and text_lang
are to be inferred from the attributes of text. So spelling them out may have
caused the problem.The file  </span>___install_temp_metadata_illum01 <span style="font-size: 10pt; color: rgb(0, 32, 96);">should have been created by cwb-s-decode
from the text_id s-attribute, so the fact that it was missing suggests that
this s-attribute is not available.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">On the more general point about
metadata: in this case the “minimalist metadata” is probably what you want so
you are going about it the right way. As the manual explains “</span><span style="font-size: 11.5pt; color: black;">The metadata file should be a
tab-delimited database. The first column should be the text id-codes, with a
line for each text. You can then have as many columns of metadata as you need</span><span style="font-size: 13.5pt; color: black;">.</span><span style="font-size: 10pt; color: rgb(0, 32, 96);">” If you haven’t got a table of information like this, then the
minimalist-metadata generates a dummy table for you. “Entering metadata fields”
simply means specifying what the columns in your table of information contain,
so is not relevant if you don’t have such a table.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">best</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);">Andrew.</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(0, 32, 96);"> </span></p>

<div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0cm 0cm; border-color: -moz-use-text-color;">

<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a>]
<b>On Behalf Of </b>Claudia Borg<br>
<b>Sent:</b> 20 July 2010 15:32<br>
<b>To:</b> CWB mailing list<br>
<b>Subject:</b> [CWB] CQPweb - managing metadata</span></p>

</div>

<div>

<div>

<p class="MsoNormal"> </p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: rgb(51, 51, 153);">Hi all,<br>
<br>
I am trying to install my own corpus though cqpweb - I have a simple vertical
text file in the following structure:<br>
<br>
&lt;text id=&quot;illum01&quot; lang=&quot;Maltese&quot;&gt;<br>
&lt;text_id &quot;illum01&quot;&gt;<br>
&lt;text_lang &quot;Maltese&quot;&gt;<br>
&lt;s&gt;<br>
word1<br>
word2<br>
...<br>
&lt;/s&gt;<br>
&lt;/text_lang&gt;<br>
&lt;/text_id&gt;<br>
&lt;/text&gt;<br>
<br>
there is no annotation (pos, lemma, ect) so its basically like a word list. The
corpus installation process goes well (I used default p-attributes, even if in
reality I only have word attribute - in future I will add pos and lemma but for
the time being I am just trying to get used to cqpweb), but then I need to
install the metadata, and I cannot quite understand what is required here. <br>
<br>
If I try to create a minimalist metadata table without specifying anything in
the manage metatdata page, then I get this error:</span></p>

<p>A mySQL query did not run successfully!</p>

<p>Error # 2: <br>
File &#39;/home/mlrs/corpora/system/temp/___install_temp_metadata_illum01&#39; not
found (Errcode: 2) </p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
<br>
<span style="color: rgb(51, 51, 153);">from mysql admin, I see that the table
text_metadata_for_illum01 has been created but it is empty (no rows).<br>
<br>
If I try to enter some metadata fields (which I cannot clearly understand
what&#39;s meant to be here), then I still get the above error. </span><br>
<span style="color: rgb(51, 51, 153);"><br>
I cannot seem to find anything specific to this problem in the documentation
(i.e. explaining what metadata should look like, ect.).  I am mainly
following:<br>
</span><a href="http://cwb.svn.sourceforge.net/viewvc/cwb/gui/cqpweb/trunk/doc/CQPweb-installing-corpora.html" target="_blank">http://cwb.svn.sourceforge.net/viewvc/cwb/gui/cqpweb/trunk/doc/CQPweb-installing-corpora.html</a><br>


<span style="color: rgb(51, 51, 153);"><br>
Any pointers would be appreciated.<br>
<br>
Regards <br>
Claudia</span></p>

</div>

</div>

</div>

</div>

<p class="MsoNormal"> </p>

</div>

</div>

<p class="MsoNormal" style="margin-bottom: 12pt;">_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">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></p>

</blockquote>

</div>

<p class="MsoNormal"> </p>

</div>

<p class="MsoNormal"> </p>

</div>

</div>

</div>

<p class="MsoNormal"> </p>

</div></div></div>

</div>


<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>
<br></blockquote></div><br>