[CWB] Displaying of multiple P attributes
Hardie, Andrew
a.hardie at lancaster.ac.uk
Mon Dec 21 04:04:13 CET 2020
There is now an approximate fix in the repo for the other two problems. They’ll be fully fix ed in 3.3.8.
Andrew.
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of mansur
Sent: 14 December 2020 09:23
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] Displaying of multiple P attributes
Hi!
Installing the intl extension helped to solve the first problem! Thank you!
Am Mo., 14. Dez. 2020 um 01:04 Uhr schrieb Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>:
Hi Mansur,
First one: it looks like you don’t have the “intl” extension installed. If you’re on a linux distro, this usually involves a package called something like php-intl .
Second one: I can’t reproduce this. Please send me, off list, some screenshots indicating the issue (what you see with free trans enabled, and what you see with it disabled)
Third one: that’s very definitely a bug in the new concordance rendering code. I’ll investigate.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of mansur
Sent: 12 December 2020 09:08
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] Displaying of multiple P attributes
Hi, Andrew!
1) You were right, for some reason the problem was in the text metadata. Regenerating it helped to solve this problem, I will continue testing it. But the freq script didn't run successfully anyway:
# php offline-freqlists.php t_corpus_v1_1
==========================================================================
This script runs all the setup for frequency lists for a corpus.
Debug messages are printed, unless the flag --quiet is provided.
SQL query content is printed if the flag --sql is provided.
Adding the flag --missing-only will cause existing data to be preserved,
and only the data that is missing to be (re)generated.
Note, if you run this script before setting up the text metdata table,
things WILL go badly wrong.
==========================================================================
About to run the function populating corpus CQP positions...
Done populating corpus CQP positions.
Function calculating category sizes was not run because there aren't any text classifications.
About to run the function making the CWB text-by-text frequency index...
Beginning to filter data from decode to encode to build the frequency-by-text CWB index...
Encoding of the by-text CWB frequency index is now complete.
Stage 1 (huffman code) compression of the frequency-list-by-text CWB database is now complete...
Stage 2 (compress-rdx) compression of the frequency-list-by-text CWB database is now complete...
Done with the frequency-list-by-text CWB database...
Done making the CWB text-by-text frequency index.
About to run the function creating frequency tables.
Done creating frequency tables...
About to calculate the cached STTR.
PHP Fatal error: Uncaught Error: Call to undefined function normalizer_normalize() in /var/www/html/cqpweb/lib/general-lib.php:724
Stack trace:
#0 /var/www/html/cqpweb/lib/corpus-lib.php(843): utf8_strfold()
#1 /var/www/html/cqpweb/lib/corpus-lib.php(759): calculate_sttr()
#2 /var/www/html/cqpweb/bin/offline-freqlists.php(196): update_corpus_sttr()
#3 {main}
thrown in /var/www/html/cqpweb/lib/general-lib.php on line 724
2) I found another problem. In the concordance the text IDs and position labels aren't shown when Free translation is enabled.
3) There are no whitespaces between words in the concordance when Interlinear glosses are enabled.
Am Fr., 11. Dez. 2020 um 20:38 Uhr schrieb Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>:
Have you installed the text metadata? The error indicates that the text metadata table does not exist. So either you have omitted to create it (which you need to do before creating frequency lists), or there is a bug…
best
Andrew.
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of mansur
Sent: 11 December 2020 13:18
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] Displaying of multiple P attributes
Thank you, Andrew! Now it works! But I cannot generate freqlists offline. Generating them online works fine!
# php offline-freqlists.php t_corpus_v1_1
...
About to run the function populating corpus CQP positions...
An SQL query did not run successfully!
Original query:
update `_txmd_000001` inner join `__tmp_1aumyeg88zgkc0w8wsc008osg`
on `_txmd_000001`.text_id = `__tmp_1aumyeg88zgkc0w8wsc008osg`.text_id
set `_txmd_000001`.cpos_begin = `__tmp_1aumyeg88zgkc0w8wsc008osg`.cpos_begin,
`_txmd_000001`.cpos_end = `__tmp_1aumyeg88zgkc0w8wsc008osg`.cpos_end
Error # 1146: Table 'cqpweb._txmd_000001' doesn't exist
PHP callstack backtrace
=======================
#1 exiterror-lib.php @ 482 : exiterror(Array[3]("An SQL query did not run succe..." , ...), NULL, NULL)
#2 sql-lib.php @ 803 : exiterror_sqlquery(1146, "Table 'cqpweb._txmd_000001' do...", "update `_txmd_000001` inner jo...")
#3 corpus-lib.php @ 1138 : do_sql_transaction_query("update `_txmd_000001` inner jo...")
#4 offline-freqlists.php @ 149 : populate_corpus_cqp_positions("t_corpus_v1_1")
Am Fr., 11. Dez. 2020 um 14:50 Uhr schrieb Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>:
OK, those should both be fixed in trunk now. – Andrew.
From: Hardie, Andrew
Sent: 11 December 2020 12:32
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: RE: Re: [CWB] Displaying of multiple P attributes
Looks like a bug. I’ll investigate. – Andrew.
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of mansur
Sent: 11 December 2020 12:14
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] Displaying of multiple P attributes
Hi!
Andrew, that is strange. Autosetup doesn't work in 3.3 from trunc:
# php autosetup.php
Now finalising setup for this installation of CQPweb....
Installing database structure; please wait.
<tr><td class="layout-contrast">
<p class="errormessage">An SQL query did not run successfully!</p>
<p class="errormessage">Original query:
CREATE TABLE `text_metadata_values` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`field_id` int unsigned NOT NULL,
`handle` varchar(200) CHARSET ascii COLLATE ascii_bin NOT NULL,
`description` varchar(255) CHARSET utf8mb4 collate utf8mb4_unicode_520_nopad_ci default '',
`n_texts` int unsigned NOT NULL default 0,
`n_tokens` bigint unsigned NOT NULL default 0,
unique key `field_id_handle`(`field_id`, `handle`),
key
) ENGINE=InnoDB
/* from User: ??? | In file: /var/www/html/cqpweb/bin/autosetup.php @ line 104 | 2020-Dec-11 08:18 */</p>
<p class="errormessage">Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ENGINE=InnoDB
/* from User: ??? | In file: /var/www/html/cqpweb/bin/auto...' at line 10</p>
</td></tr>
...
I tried autoconfig.php, it also doesn't work:
# php autoconfig.php
/***********************/
This is the interactive configuration-file creator for CQPweb.
First, you must enter a username for the system adminstrator account, or 'superuser'.
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function get_variable_username(), 0 passed in /var/www/html/cqpweb/bin/autoconfig.php on line 49 and exactly 1 expected in /var/www/html/cqpweb/bin/cli-lib.php:288
Stack trace:
#0 /var/www/html/cqpweb/bin/autoconfig.php(49): get_variable_username()
#1 {main}
thrown in /var/www/html/cqpweb/bin/cli-lib.php on line 288
Am Fr., 11. Dez. 2020 um 14:06 Uhr schrieb Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>:
3.3 is the version in trunk. Still has some known bugs but it’s rather more stable than it was back in March (the Lancaster server has been running it mostly happily since then).
>> Is it possible to make glosses multiline.
Yes in 3.3. but you’d need to write the code for it to reformat the embedded data, which would be complex. In 3.2, no, except with a LOT of hacking about.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of mansur
Sent: 10 December 2020 17:13
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] Displaying of multiple P attributes
Hi, Andrew!
Thank you for the advice. I will try it tomorrow, which repository/directory should I use to get version 3.3? Now I am using 3.2-latest.
Another question arose. Is it possible to make glosses multiline. Inserting tag <br> doesn't work there. My idea was to put there several attributes and divide them into lines.
With best wishes,
Mansur
Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>> schrieb am Do., 10. Dez. 2020, 19:00:
Hi Mansur,
CQPweb v3.3 can embed arbitrary p-attribute data into <span> elements in the concordance HTML. Youi can then use an extra JavaScript file to render them in the interface however you like.
The control for this is under “Manage visualisation”, and looks like this:
Error! Filename not specified.
In version 3.2 things are much more limited. You only really have access to the word and primary annotation, which is what shows up in the tooltip.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of mansur
Sent: 10 December 2020 09:23
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: [CWB] Displaying of multiple P attributes
Hi!
Our corpora have many layers of word level annotation (P): wordforms in several variants, lemmas in 2 variants, pos, additional morph-l tags and some others...
What is the best way of displaying them all in found sentences? I could only find a way of displaying "word_POS word2_POS2..." in tooltips. Using tooltips looks like a good choice, but any other way is also acceptable. But how to display all those P attributes? And I suppose it is better to display such a big amount of P-attributes in vertical format, not? Any ideas, recommendations, please?
With best wishes,
Mansur
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7Cf9ccab75be4f4ee1e2b908d8a0120e33%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637435346710639587%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=F9vk%2FUlEpKa572gn%2BXBm3qcrUxSmu47zdaPxa%2FrMF3g%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7Cf9ccab75be4f4ee1e2b908d8a0120e33%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637435346710649543%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oy%2BysvIJsE%2FOGEVqhyXACPGdlAST5Bq4FfmHGQqCqnc%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7Cf9ccab75be4f4ee1e2b908d8a0120e33%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637435346710649543%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oy%2BysvIJsE%2FOGEVqhyXACPGdlAST5Bq4FfmHGQqCqnc%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7Cf9ccab75be4f4ee1e2b908d8a0120e33%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637435346710659497%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BlbwuYHTwvt8rMyoU2aJnwWggmMlsoTdFGNRKF9S9po%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7Cf9ccab75be4f4ee1e2b908d8a0120e33%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637435346710659497%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BlbwuYHTwvt8rMyoU2aJnwWggmMlsoTdFGNRKF9S9po%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20201221/0844ead9/attachment-0001.html>
More information about the CWB
mailing list