[CWB] CQPweb: Suggestions for improvement (categories, POST)

Hardie, Andrew a.hardie at lancaster.ac.uk
Wed Mar 8 18:03:14 CET 2017


>>>1. The rules for handles to build categories for the meta data from the xml text values is very strict.

This is 100% intentional and by design. Handles may have to be used in contexts where things that are not A-Za-z0-9_ can break parsing and stop the handle being identified properly. (EG in the internal serialisation of query restrictions, query postprocesses, other things....)

>> I did'n experience any problems with this solution.

More precisely, you haven't experienced any problems *yet*. 

Use this solution at your own risk. I am not going to change the rules for handles.

>> Creating the metadata table from corpus XML annotations does not work if there are a lot of different xml annotations......... I think the better solution would be to use POST instead of GET in the form

Quite correct. I do use POST for some forms, but I'd not realised this one where that would be useful. I've made the change in my copy, it'll be committed anon.

>> And I changed all the necessary $_GET strings in metadata-admin.inc.php to $_POST.

Not necessary. See lines 798-801 of environment.inc.php

best

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Noah Bubenhofer
Sent: 08 March 2017 16:48
To: Open source development of the Corpus WorkBench
Subject: [CWB] CQPweb: Suggestions for improvement (categories, POST)

Hi,

after having installed revision 931 of cqpweb and some experience with CQPweb (the older versions...) I have the following suggestions to improve the software:

1. The rules for handles to build categories for the meta data from the xml text values is very strict. I have changed the following:

xml.inc.php:439:
        $test = '|^[\w _äöüÄÖÜßáàâéèêíìîóòôúùûçÇ\/\-]{0,' . $maxbytes . '}$|';

admin-lib.inc.php:656:
        $result = do_mysql_query("select distinct `$field` from text_metadata_for_$corpus where `$field` REGEXP '[^A-Za-z0-9_ äöüÄÖÜßáàâéèêíìîóòôúùûçÇ\-\/]'");

I did'n experience any problems with this solution. There might be a more elegant solution instead of naming all the accented characters.

2. Creating the metadata table from corpus XML annotations does not work if there are a lot of different xml annotations. This is due to the very long URI which results from the get form. Of course it is possible to reconfigure the web server allowing longer URIs, but I think the better solution would be to use POST instead of GET in the form.

I changed:
indexforms-admin.inc.php:830
<form action="metadata-admin.php" method="post">

And I changed all the necessary $_GET strings in metadata-admin.inc.php to $_POST. 

Best,
Noah




Universität Zürich
Institut für Computerlinguistik
Projekt "Visual Linguistics"

Andreasstrasse 15
CH-8050 Zürich

www.bubenhofer.com
www.visual-linguistics.net
bubenhofer at cl.uzh.ch (PGP-Schlüssel vorhanden)
Tel. +41 44 635 67 18
Büro 2.18

_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list