[CWB] Query from command line

Stefan Evert stefanML at collocations.de
Thu Mar 24 18:29:12 CET 2016


> On 24 Mar 2016, at 16:43, Andres Chandia <andres at chandia.net> wrote:
> 
> is there a way to query a corpus from command line, for example, like this:
> I'm just inventing the syntax for you to understand what I mean:
> 
> # cqp "CORPUS" :: text_id = "TID1" :: [pos="NN.*"] > some_file.txt
> 

Well, you can simply work with CQP on the command line.  If you want to do this in batch mode, you can write the commands to a file and the use the -f option.

Or use the (somewhat deprecated) cqpcl program, e.g.

	cqpcl 'DICKENS;' 'A="silly" [pos="NN"];' 'set pp off;' 'group A matchend lemma;'

Best,
Stefan



More information about the CWB mailing list