[CWB] multiple commands with WebCqp::Query

Serge Sharoff s.sharoff at leeds.ac.uk
Fri Aug 18 16:13:35 CEST 2006


Hi Stefan,

Added you as an administrator to CSAR.  As for:

> I'm still waiting to find some time to write a Perl implementation of  
> CEQL (the Common Elementary Query Language, which can conveniently be  
> pronounced "sequel") that will also include full documentation of the  
> query syntax.  I used Parse::RecDescent for the BNCweb implementation  
> of CEQL, but the parsers generated by this module are huge and slow  
> (i.e., the Perl code needs up to .5 seconds to be compiled whenever a  
> simple query is executed), so I'm looking for a better solution.  In  
> the meantime, I could post the BNCweb syntax summary and perhaps also  
> the provisional implementation if you think this would be useful.
As you know I developed another simplified query language, which is
converted into the full CQP by regular expressions only (the simplified
language is simple by its nature).

In Forli we agreed on merging the two versions using the following
guidelines:
     1. a query term X on its own corresponds to [word="X"]
     2. a query term X followed (preceded?) by # corresponds to
        [lemma="X"]
     3. there can be conjunctions, disjunctions and standard regular
        expressions in query terms, which are simply sent unchanged to
        the output
     4. a query term X followed by /Y corresponds to [word="X"&pos="Y"]
     5. /Y on its own corresponds to [pos="Y"]
     6. a sequence of query terms separated by spaces corresponds to a
        sequence of corresponding CQP expressions
     7. symbol .. (two dots on their own) corresponds to a gap (I think
        we discussed the possibility of specifying the length of the
        gap, but I'm not sure about the syntax proposed)
     8. there's an option for specifying the order of constituents; in
        my current implementation this is +nX +mY which corresponds to
        MU(meet "X" "Y" -n m), but again I can't remember the final
        details we agreed on

I think this is all we need for CEQL and this syntax can be easily
implemented by regular expressions.  Anything beyond this set has to be
expressed in the full CQP syntax.  

S


More information about the CWB mailing list