[CWB] [CQPweb] problem encountered when installing a corpus from scratch using install-corpus.php

wu liangping liangpingwu at 126.com
Tue Jul 27 14:29:30 CEST 2021


I copied the install-corpus.php from version 3.3.9 into my v3.2.43 box and included two more parameters of $_GET["includeFile"] and $_GET["cssBuiltIn"] and it works now.
Plus, I also made an experimental install-metadata.php in the exe folder (and it automatically populates itself into every individual corpus), following the suit of the good install-corpus.php.
So now it is (in theory) possbile to automate the setup of a dynamic corpus (without much pain).
Thanks a lot for your work!


Best,
WU Liangping
 




At 2021-07-27 16:20:03, "Hardie, Andrew" <a.hardie at lancaster.ac.uk> wrote:

Thanks for this! I’ve fixed the install-corpus.php  script in the repo.

 

(I think. Pending other bug reports.)

 

best

 

Andrew.

 

From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of wu liangping
Sent: 27 July 2021 04:06
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] [CQPweb] problem encountered when installing a corpus from scratch using install-corpus.php

 

I think I've got it. 

The version info part in  install-corpus.php says: "This script tracks the install-corpus form."  If we look at what happens when we submit that form to the server (in Chrome F12 will do the job), the url link explains everything.

Problem solved.

 

Best,
WU Liangping
 

 

At 2021-07-26 14:21:53, "wu liangping" <liangpingwu at 126.com> wrote:

Dear all,

 

Installing a corpus anew from the command line without clikcing around is such an attracitve option in terms of efficiency (and automation), so the install-corpus.php story here.

 

I have a tiny (experimental) corpus test.txt with only two columns:

<text id="sample">
<s>
I     I
am    am
just  just
a     a
testing      testing
line  line
.     .
</s>
<s>
I     I
am    am
just  just
another      another
testing      testing
line  line
.     .
</s>
</text>
The test.txt file has been uploaded to cqpweb's upload area, and the XmlTemplate and AnnotationTemplate have also been defined from the CQPweb GUI, and finally I run the following command from /path/to/cqpweb/bin:
php install-corpus.php  --corpus_name="test"  --corpus_description="a test corpus" --cssBuiltIn="blue.css" --corpus_charset="utf8" --useXmlTemplate=2 --useAnnotationTemplate=6  --file="test.txt"
However, it keeps saying that "You must specify at least one file to include in the corpus!" (my CQPweb version is 3.2.43)
My first guess is that something might be wrong with the format of the parameters specified. According to the online documentation, --file would expect a "list" of files (at least one file is required). However, I tried different combinations but without luck.
Any hint?  
Thanks for any input.

Best,
WU Liangping
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20210727/4b64fef2/attachment.html>


More information about the CWB mailing list