[CWB] macro

Hardie, Andrew a.hardie at lancaster.ac.uk
Wed Jan 28 02:03:07 CET 2015


Hi Alain,

Macros don't work in CQPweb, for two reasons: (1) for security, the CQPweb query box will only run commands that are queries - not any other commands; (2) CQPweb does not have persistent CQP state: every CQPweb query uses a new CQP slave process, so any macro you defined would be lost before you could run a query with it.

There IS a way to run macros in CQPweb, albeit it is pretty rudimentary (And creates a bit of a security hole, in fact), not fully tested,  and may change in later versions:

* Go to "user macros" (which in 3.1.11 is under the /usr interface; in earlier version it's on the menu for each specific corpus) and enter a title and body - then add it to the database.
* That macro will then be available in any query you subsequently run.

best

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of guerreau
Sent: 25 January 2015 13:04
To: cwb at sslmit.unibo.it
Subject: [CWB] macro
Importance: High



Dear All,


I work with xubuntu 14.04, cwb 3.4.8 and cqpweb 3.1.11.
My cqpweb inistallation is a standalone installation (loopback), i am user and admin.

In config.inc.php, i put :

$cqpweb_no_internet = true ;
$print_debug_messages = true ;

I have a cqp macro which works well with cqp :

MACRO cooc(3)
(
([lemma="$0"][]{0,$1}[lemma="$2"])|([lemma="$2"][]{0,$1}[lemma="$0"])
)
;

I tried to recreate that macro under cqpweb, but with no result, i dont receive any message (!), nothing happens… I have probably done something wrong, but what ??

Thanks,
Best,

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


More information about the CWB mailing list