The corpus query interface (CQi) is a cross-language remote client-server interface that provides low-level corpus access as well as (almost) complete CQP functionality. Its main purpose is to enable the development of APIs for programming languages such as Java, which cannot easily be linked to C libraries or run an interactive CQP backend. It also allows GUI clients to connect remotely to a dedicated corpus server.
The standard CWB distribution includes a stand-alone CQPserver that implements the CQi protocol. It can be started by running the command
cqpserver in a terminal window (type
cqpserver -h for connection options).
The CQi tutorial gives a first impression of the functionality and usage of the CQi client-server API. The CQi specification (.zip, 0.1 MiB) lists available CQi commands and defines the corresponding bytecodes, with suitable header files for various programming languages. A reference implementation written in Perl is included in the CWB/Perl packages, together with a few sample scripts.
Note that the CQi specification is still in draft stage and may change fundamentally in future CWB releases.