[CWB] Dramatic texts in cqpweb

Graham Ranger -- UAPV graham.ranger at univ-avignon.fr
Fri Nov 17 12:11:53 CET 2017


Dear Thilo,
Thanks for this. You were right: I was running this from 
/home/dicc/cqpweb/bin and should have been running it from 
/var/www/html/cqpweb/bin, etc. The script ran correctly from the right 
folder.
I still have a difference between database and cqpweb code, however, 
with the CQPweb database at version 3.2.27 and cqpweb at 3.2.31.
As before, other corpora work as intended. But one corpus won't let 
itself be deleted.
Best,
Graham.



Le 17/11/2017 à 11:37, Thilo Wiertz a écrit :
> Dear Graham, still looks as if upgrade-database.php cannot find or access the relative path to the config file (../lib/config.inc.php: failed to open stream). This file contains settings to access the mysql server, which explains the following undefined variable errors. You could try „less ../lib/config.inc.php“ from the bin dir to check whether the file is at its proper location and the current user has access.
>
>> Am 17.11.2017 um 11:00 schrieb Graham Ranger -- UAPV <graham.ranger at univ-avignon.fr>:
>>
>> Dear Thilo,
>> Thanks for taking the time to answer. The corpus problem appears to be resolved. Running the php script from inside the bin directory as you suggested gave me a different set of error messages, which I reproduce below.
>> The cure seems to be getting more complicated as I progress. I'm therefore wondering about a fresh installation -- I can recover the list of users' emails first, and I have the corpora saved locally. In this case, could somebody tell me what I should remove (or rename) before running the autosetup scripts?
>> Best,
>> Graham.
>>
>> php upgrade-database.php
>> PHP Warning:  include(../lib/config.inc.php): failed to open stream: No such file or directory in /home/dicc/cqpweb/bin/upgrade-database.php on line 99
>> PHP Warning:  include(): Failed opening '../lib/config.inc.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/dicc/cqpweb/bin/upgrade-database.php on line 99
>> PHP Notice:  Undefined variable: mysql_schema in /home/dicc/cqpweb/bin/upgrade-database.php on line 105
>> PHP Notice:  Undefined variable: mysql_webpass in /home/dicc/cqpweb/bin/upgrade-database.php on line 106
>> PHP Notice:  Undefined variable: mysql_webuser in /home/dicc/cqpweb/bin/upgrade-database.php on line 107
>> PHP Notice:  Undefined variable: mysql_server in /home/dicc/cqpweb/bin/upgrade-database.php on line 108
>> CQPweb has encountered an error!
>> ================================
>>
>>      <table class="concordtable" width="100%">
>>          <tr>
>>              <th class="concordtable">CQPweb encountered an error and could not continue.</th>
>>          </tr>
>>      MySQL did not connect - please try again later!
>>
>> PHP Warning:  mysql_close() expects parameter 1 to be resource, boolean given in /home/dicc/cqpweb/lib/library.inc.php on line 207
>>
>> Le 17/11/2017 à 10:15, Thilo Wiertz a écrit :
>>> Dear Graham
>>>
>>> I certainly cannot help with your corpus problem but just encountered the same error message running upgrade database. Since the php script uses relative paths to other scripts (in ../lib/...) you may need to change dir to the bin directory and run from there.
>>>
>>> Best,
>>> Thilo
>>>
>>>> Am 17.11.2017 um 09:56 schrieb Graham Ranger -- UAPV <graham.ranger at univ-avignon.fr>:
>>>>
>>>> Update:
>>>> I have seen that the difference between 3.2.22 and 3.2.23 shouldn't be a problem (in upgrade-database.php).
>>>> On running upgrade-database.php (to try to get to 3.2.23 for both) I get the following error message:
>>>>
>>>> php bin/upgrade-database.php
>>>> PHP Warning:  require(../lib/environment.inc.php): failed to open stream: No such file or directory in /home/dicc/cqpweb/bin/upgrade-database.php on line 38
>>>> PHP Fatal error:  require(): Failed opening required '../lib/environment.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/dicc/cqpweb/bin/upgrade-database.php on line 38
>>>>
>>>> I'm wondering whether the fact the I cannot delete the corpus might have at its root a corpus that was not fully installed to begin with.
>>>> Thanks in advance for any help.
>>>> Best,
>>>> Graham.
>>>>
>>>>
>>>>
>>>>
>>>> Le 16/11/2017 à 21:27, Hardie, Andrew a écrit :
>>>>> Hi Graham,
>>>>>
>>>>> The absence of idlink_values is a serious error indicating an incomplete setup. Is this a CQPweb installation that you created recently, or did you upgrade it from an earlier version?
>>>>>
>>>>> If you upgraded, it seems like the new tables that store information on idlinks have not been wholly set up. You can check this by looking at the database version
>>>>>
>>>>> select * from system_info;
>>>>>
>>>>> ... in your mysql client, and comparing the version of the database to the version of the code that you are running.
>>>>>
>>>>> best
>>>>>
>>>>> Andrew.
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Graham Ranger -- UAPV
>>>>> Sent: 16 November 2017 18:03
>>>>> To: cwb at sslmit.unibo.it
>>>>> Subject: Re: [CWB] Dramatic texts in cqpweb
>>>>>
>>>>> Hi Andrew,
>>>>> Many thanks... The query is now running as intended.
>>>>> I followed your suggestions, and had a look at the sp_who attribute
>>>>> value, which showed that there were encoding problems in the source
>>>>> file. I must have copied and pasted some TEI code from somewhere, and in
>>>>> addition to the hashtag (which was not of my own making) there were a
>>>>> few funny quotation marks, too.
>>>>> Once I'd tidied these bits up, the query ran perfectly.
>>>>> A subsidiary question (which might merit a new thread): while installing
>>>>> and uninstalling corpora, I ran across an error that prevents me from
>>>>> uninstalling with the following message:
>>>>> "Original query: delete from idlink_values where corpus = 'marivaux_1'
>>>>> and att_handle = 'sp_who' /* from User: granger | Function:
>>>>> do_append_mysql_comment() | 2017-Nov-16 17:43:02 */
>>>>> Error # 1146: Table 'cqpweb.idlink_values' doesn't exist"
>>>>> Other attempts to create the table give me "MARIVAUX_1" is undefined.
>>>>> This problem is not particularly crucial: it's just a question of
>>>>> tidying up the area after the experiments phase.
>>>>> Thanks very much again for your help.
>>>>> Best,
>>>>> Graham.
>>>>>
>>>>>
>>>>>
>>>>> Le 16/11/2017 à 17:25, Hardie, Andrew a écrit :
>>>>>> Hi Graham,
>>>>>>
>>>>>> First, a point about IDs in your sp_who attribute - the assumption is that these will be handles, i.e. contain only alphanumeric characters or underscore. At the level of CQPweb then, your use of the # symbol in the ID codes may be causing problems.
>>>>>>
>>>>>> However, that can't account for the failure of
>>>>>>
>>>>>> n:[pos = "NOM"] :: n.sp_who = "#PIERRE" ;
>>>>>>
>>>>>> ... because that is just using the index at the3 CWB level, so violating CQPweb's additional requirements should not affect the outcome.
>>>>>>
>>>>>> Can I make the following suggestion: run just
>>>>>>
>>>>>> [pos = "NOM"]
>>>>>>
>>>>>> and then use the Tabulation function (Download... > Switch to tabulation) to get a text file with one column containing the sp_who attribute value for each hit? This should let you see what is going on in the underlying index, and thus will hopefully give some clue as to what the issue is.
>>>>>>
>>>>>> best
>>>>>>
>>>>>> Andrew.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Graham Ranger -- UAPV
>>>>>> Sent: 16 November 2017 12:07
>>>>>> To: cwb at sslmit.unibo.it
>>>>>> Subject: Re: [CWB] Dramatic texts in cqpweb
>>>>>>
>>>>>> Hello,
>>>>>> Many thanks for this previous answer. I am still struggling to get the
>>>>>> CQP query working however.
>>>>>> I've set up a micro-corpus for testing purposes, tagged for POS and
>>>>>> lemma and with minimal xml, including <sp> and attribute "who". So: "<sp
>>>>>> who=#"PIERRE”> ... </sp>" for material spoken by "Pierre".
>>>>>> A CQP query like:
>>>>>> n:[pos = "NOM"] :: n < 25;
>>>>>> works, so labels and global constraints are functioning, but the CQP query:
>>>>>> n:[pos = "NOM"] :: n.sp_who = "#PIERRE" ;
>>>>>> does not. Or rather, it returns no results although Pierre does indeed
>>>>>> say a few nouns. I suppose that I must have set up the "sp_who"
>>>>>> attribute wrongly in some way. It figures in the list under "Manage
>>>>>> corpus XML" as an ID Link. I hope this is enough for a diagnosis at a
>>>>>> distance...
>>>>>> A similar query on the Spoken BNC2014 corpus https://cqpweb.lancs.ac.uk/
>>>>>> works. Having checked that "S0021" was used as a speaker i.d., and that
>>>>>> the speaker used a plural noun at least once, I tried "n:[pos = "NN2"]
>>>>>> :: n.u_who = "S0021" ;" with positive results.
>>>>>> As always, any help in sorting this out would be very much appreciated!
>>>>>> Best,
>>>>>> Graham.
>>>>>>
>>>>>> Le 06/11/2017 à 11:59, Hardie, Andrew a écrit :
>>>>>>> Assuming that sp_who is of datatype ID-link, this can't at present be done within the interface, though that is in the works.
>>>>>>>
>>>>>>> (Unless your ID link metadata includes a classification-type column that duplicates the speaker ID. That would do it.)
>>>>>>>
>>>>>>> Currently the most direct way to do this is via a CQP syntax query with a global constraint of the form
>>>>>>>
>>>>>>> xx.sp_who = "Bill"
>>>>>>>
>>>>>>> where xx is a label specified within the main part of the query.
>>>>>>>
>>>>>>> See CQP tutorial section 4.1
>>>>>>>
>>>>>>>
>>>>>>>>> the categorisation schemes, which, I suspect, only apply to texts.
>>>>>>> No, they apply to s-attributes of type ID link too...
>>>>>>>
>>>>>>> best
>>>>>>>
>>>>>>> Andrew.
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Graham Ranger -- UAPV
>>>>>>> Sent: 06 November 2017 10:11
>>>>>>> To: cwb at sslmit.unibo.it
>>>>>>> Subject: Re: [CWB] Dramatic texts in cqpweb
>>>>>>>
>>>>>>> Hello,
>>>>>>> And thanks again to those who answered my previous question re: setting
>>>>>>> up dramatic texts with limited xml encoding for use in cqpweb.
>>>>>>> I have a further question, which follows on from the previous -- and may
>>>>>>> be just as naive.
>>>>>>> Given a speaker tag <sp> with attribute "who", such that an intervention
>>>>>>> by a character called Bill in a play might be <sp
>>>>>>> who="Bill">Hello!</sp>, can cqpweb provide a way for extracting
>>>>>>> occurrences within all interventions by Bill? I've tried in various
>>>>>>> ways, by don't seem to be able to include this in the categorisation
>>>>>>> schemes, which, I suspect, only apply to texts.
>>>>>>> Thanks in advance for any help on this.
>>>>>>> Best,
>>>>>>> Graham.
>>>>>>> _______________________________________________
>>>>>>> CWB mailing list
>>>>>>> CWB at sslmit.unibo.it
>>>>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>>>>>> _______________________________________________
>>>>>>> CWB mailing list
>>>>>>> CWB at sslmit.unibo.it
>>>>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>>>>> _______________________________________________
>>>>>> CWB mailing list
>>>>>> CWB at sslmit.unibo.it
>>>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>>>>> _______________________________________________
>>>>>> CWB mailing list
>>>>>> CWB at sslmit.unibo.it
>>>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>>>> _______________________________________________
>>>>> CWB mailing list
>>>>> CWB at sslmit.unibo.it
>>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>>>> _______________________________________________
>>>>> CWB mailing list
>>>>> CWB at sslmit.unibo.it
>>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>>> _______________________________________________
>>>> CWB mailing list
>>>> CWB at sslmit.unibo.it
>>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>>> _______________________________________________
>>> CWB mailing list
>>> CWB at sslmit.unibo.it
>>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>> _______________________________________________
>> CWB mailing list
>> CWB at sslmit.unibo.it
>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb



More information about the CWB mailing list