[CWB] cqpserver

Stefan Evert stefanML at collocations.de
Wed Nov 1 11:22:09 CET 2017


> On 31 Oct 2017, at 20:36, Andrés Chandía <andres at chandia.net> wrote:
> 
> Hi there, Im trying to connect to a cqpserver but I get errors, I'm following the CQi tutorial
> 
> but then I get:
> 
> CQI_CTRL_CONNECT("demo","password")
> bash: syntax error near unexpected token `"demo","password"'
> 
> What am I doing wrong?

The commands in the CQi tutorial are just pseudocode showing you how the interface works – there aren't corresponding shell functions that would allow you to use them in a terminal (and if there were, the bash syntax for calling them would look quite different).

In order to access a CQPserver, you need a client library for your programming language of choice, which understands the binary CQi protocol and is expected to give you an interface that looks quite similar to the pseudocode in the tutorial.

I think users have developed such clients for various languages, but I am not sure about the status of different projects.  The only officially maintained code is a Perl client in the CWB/Perl packages, which is also intended as a reference implementation of the protocol.  So the easiest way to try out CQi is to install the CWB-CQI distribution from the SVN repository:

	http://cwb.sourceforge.net/developers.php

The CWB-CQI package also includes demo scripts (in examples/) and self-tests (in t/) that you can use for a quick start.

I know that there is also an R client in the polmineR package:

	https://cran.r-project.org/web/packages/polmineR/index.html

Best,
Stefan




More information about the CWB mailing list