<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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 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;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.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:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Mansur,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">To supplement Stefan’s reply…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>>:</span> This suggests that you have CQP installed, but in a "private" path that's only visible to your user account and not to the
Web server running CQPweb. You may also need to configure CQPweb and set appropriate paths there.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Specifically – set the configuration variable $path_to_cwb. See admin manual page 24. this tells CQPweb where to find the CQP executable.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">On export corpus -
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>></span> AFAIK, only users with the "full access privilege" are allowed to download a corpus. So if you want to disable downloads,
simply keep to "normal access".<span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This is correct. Manual p 81.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>></span>6) When I press 'Show frequency information' I get:<br>
Error # 1146: Table 'cqpweb_db.freq_corpus_smi_word' doesn't exist <o:p></o:p></p>
<p class="MsoNormal">Do I need to generate it somehow manually?<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">If you have not set up the frequency list, you can’t view it! See the “Manage frequency lists” option.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">But note that frequency list setup requires the CQP / CWB executables, ,so, it won’t work till you have fixed the executables problem.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>></span>8) What does mean all those 'Cannot be calculated'. What should I do to fix it?<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">The comments in brackets explain why each one cannot be calculated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">N of texts requires the text metadata to have been set up (either by adding metadata or creating a “minimalist” table.)
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">N of tokens is not set up until text metadata and frequency lists are generated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">N of types relies on the frequency lists,.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Type token ratio relies on the previous 2.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>>
</span>[Wed Feb 21 20:48:48.580421 2018] [php7:warn] [pid 5262:tid 139681043830528] [client
<a href="http://127.0.0.1:59340" target="_blank">127.0.0.1:59340</a>] PHP Warning: chmod(): Operation not permitted in /var/www/htdocs/cqpweb/lib/admin-install.inc.php on line 605, referer:
<a href="http://localhost/cqpweb/adm/index.php?thisF=installCorpusIndexed&uT=y" target="_blank">
http://localhost/cqpweb/adm/index.php?thisF=installCorpusIndexed&uT=y</a><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This suggests you have a permissions problem. The system is trying to call chmod() but is not allowed to. Possibly, the username your
web server runs under does not have the necessary permissions for the web directory. See manual p 12.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>></span> Wed Feb 21 20:50:04.431408 2018] [php7:warn] [pid 5262:tid 139679844263680] [client
<a href="http://127.0.0.1:59348" target="_blank">127.0.0.1:59348</a>] PHP Warning: array_unshift() expects parameter 1 to be array, string given in /var/www/htdocs/cqpweb/lib/ceql.inc.php on line 260, referer:
<a href="http://localhost/cqpweb/smi/index.php?thisQ=search&uT=y" target="_blank">
http://localhost/cqpweb/smi/index.php?thisQ=search&uT=y</a><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This one is due to a bug, thanks for spotting it. I have fixed it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>></span>2) After that I used the CQPweb, CQL search worked fine, but simple search didn't work:<br>
>>Can't locate ../lib/perl/cqpwebCEQL.pm at - line 2. <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">My guess is that this is the same permissions issue. Your web server can’t locate the file EITHER because it does not have the right
permission for that file, or its containing directory; OR because an issue relating to file permissions has stopped it running in the right location – resulting in the relative address being incorrect.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">The easiest way to fix permissions globally is to move ownership of the CQPweb folder and all its tree to the username your web server
runs under,.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This relative path is a reference to the CQPweb internal code, so it should not need an entry in $perl_extra_directories (such entries
should be used to locate non-CQPweb modules). <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">@ Stefan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">>>
</span> @Andrew: has this bug been fixed in the lastest CQPweb code?<span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Tags are, to the best of my knowledge, html-escaped in the present code. HOWEVER, use of <…> may confuse the system with the code
used to extract corpus XML for visualisation purposes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">@ Mansur<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">It
<i>really is best</i> not to use < and > in tags!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">best<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Andrew.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> cwb-bounces@sslmit.unibo.it [mailto:cwb-bounces@sslmit.unibo.it]
<b>On Behalf Of </b>mansur<br>
<b>Sent:</b> 22 February 2018 09:55<br>
<b>To:</b> Open source development of the Corpus WorkBench <cwb@sslmit.unibo.it><br>
<b>Subject:</b> Re: [CWB] Escape "<" and ">" symbols<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello, Stefan!<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thank you so much for the answers and advice! They clearified me many things.<br>
<br>
> You may also need to configure CQPweb and set appropriate paths there.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Could you, please, explain how I can do that?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you!<o:p></o:p></p>
</div>
<p class="MsoNormal">Best,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Mansur<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 22 February 2018 at 11:52, Stefan Evert <<a href="mailto:stefanML@collocations.de" target="_blank">stefanML@collocations.de</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Dear Mansur,<br>
<br>
most of the remaining issues are related to CQPweb, so Andrew will be in a much better position to answer them and help you with the debugging. Some of them are clearly (mis-)configuration issues, e.g. the failure to locate the CEQL backend that is part of
CQPweb or the failure to run CQP.<br>
<br>
Are you working with an up-to-date version of CQPweb checked out from the SVN repository?<br>
<br>
<br>
> 3) After rebooting computer any search does not work at all:<br>
> ERROR: CQP backend startup failed; the reported CQP version [] could not be parsed.<br>
> But from the comman line I can perform search with 'cqp -e' and it seems to be working, at least I can see search results.<br>
<br>
This suggests that you have CQP installed, but in a "private" path that's only visible to your user account and not to the Web server running CQPweb. You may also need to configure CQPweb and set appropriate paths there.<br>
<br>
> 4) Is it possible to choose ranges of periods in search according to the 'date'?<br>
> <text id="" date=?????><br>
<br>
I think Andrew is working on support for date attributes in CQPweb.<br>
<br>
In plain CQP, there are two ways of doing date searches:<br>
<br>
a) The reasonable way: Store your dates in a simple standard format – I prefer ISO YYYY-MM-DD, so alphabetical and chronological sort order are the same – and then construct regular expressions for your suitable date ranges, e.g. in the global constraint of
a CQP query:<br>
<br>
… :: match.text_date = "2011-03.*"; # anything in March 2011<br>
<br>
… :: match.text_date = "1990-(01-(1[2-9]|[23]\d)|02-.*|03-([0-1]\d|2[0-4]))"; # 12 Jan 1990 .. 24 Mar 1990<br>
<br>
b) The "I'm a Unix hacker way": convert your dates to 32-bit integers and use numeric comparisons. The obvious choice would be consecutive numbers for days (or even seconds as in Unix timestamps), but conversion from/to human-readable dates will be complicated.
However, you could encode the ISO-format above _without_ the hyphens to get 8-digit numbers, e.g.<br>
<br>
<text id="…" date="20180222"><br>
<br>
and then cast to integers for numerical comparisons:<br>
<br>
… :: int(match.text_date) >= 19900112 & int(match.text_date) <= 19900324;<br>
<br>
Nice trick, isn't it?<br>
<br>
> 5) When I press 'Show tags' button I get<br>
> 2012_ нче_ елда_ республикада_ 55_ мең_ 839_ бала_ дөньяга_ килгән_ ._<br>
> but no tags.<br>
<br>
That's because CQPweb failed to do proper HTML-escaping for the annotation strings (which is not only incovenient but also a security risk).<br>
<br>
@Andrew: has this bug been fixed in the lastest CQPweb code?<br>
<br>
I've been bitten by similar issues before and would recommend avoiding HTML metacharacters (and other funny things) in annotation strings. Better recode to something like<br>
<br>
n:sg:px3sp:nom<br>
<br>
or even<br>
<br>
|n|sg|px3sp|nom|<br>
<br>
so you can use the "contains" operator in searches.<br>
<br>
> I think it is maybe because I didn't replace "<" and ">" in my morphological tags to their XML entities yet. Please, correct me if I'm wrong.<br>
<br>
That won't help! With -x, cwb-encode will decode the XML entities in your input file and you'll end up with < and > in the indexed corpus. You could encode without the -x flag, but then your annotation strings will be<br>
<br>
&lt;n&gt;&lt;sg&gt;&lt;px3sp&gt;&lt;nom&gt;<br>
<br>
which happens to display nicely only until HTML escaping in CQPweb is fixed – and you will have to search for<br>
<br>
[pos = ".*&lt;nom&gt;.*"]<br>
<br>
instead of<br>
<br>
[pos = ".*<nom>.*"]<br>
<br>
> 7) I also saw the button 'Export corpus -> Export whole corpus'. Does that mean that users can download the whole corpus? Is it possible to turn it off somehow?<br>
<br>
AFAIK, only users with the "full access privilege" are allowed to download a corpus. So if you want to disable downloads, simply keep to "normal access".<br>
<br>
<br>
Best,<br>
Stefan<br>
<br>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it">CWB@sslmit.unibo.it</a><br>
<a href="http://liste.sslmit.unibo.it/mailman/listinfo/cwb" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>