[CWB] CQP Python interface
Jørg Asmussen
ja at dsl.dk
Fri Mar 7 17:54:17 CET 2008
Hi!
Den 07/03/2008 kl. 13:13 skrev Stefan Evert:
> I know that some people have been working on a Python interface at
> least for CQP -- we're currently working on our own implementation
> in Osnabrück -- and I'd be interested in porting the C API for
> direct corpus access from Perl to Python.
I might be one of those "some people". I almost literally translated
Stefan's Perl CQP interface to Python, latest version attached in case
anybody wants it or wants to place it on sf.net. However, there is one
substantial modification to Stefan's code: I added a "progress
controller" running in its own thread and controlling CQP's
responsiveness. If CQP for some reason doesn't respond anymore, it
will be killed by the controller. If this seems confusing, just
comment out line 72 of the code. I need it in order to avoid CQP
causing to block the corpus server software that uses this interface.
The Python CQP interface is just a minor part of the Python-based
corpus server (PyCOCS) I've been developing over the past 2 years or
so -- and which we are using as backend in our web-based corpus
service KorpusDK (Danish, alas!), cf. test.ordnet.dk/korpusdk (not yet
officially published, but almost finished, comments welcome!). If I
ever figure out how to upload stuff to the cwb sf.net site, I might
place the PyCOCS code there...
Well, I'd be interested in porting the C API too, but I'm not able to
figure it out myself and I'm almost always lacking time. But maybe I
and somebody else somewhen may find a slot for that ;-)
Best wishes,
Jörg
Jørg Asmussen
DET DANSKE SPROG- OG LITTERATURSELSKAB, DSL
Society for Danish Language and Literature
AFD. FOR DIGITALE ORDBØGER OG TEKSTKORPORA
Dept. for Digital Dictionaries and Text Corpora
Christians Brygge 1 Tel. +45 33 13 84 20 - 9636
DK-1219 København K Fax +45 33 14 06 08
http://www.dsl.dk
http://dsl.dk/ja
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PyCQP_interface.py.zip
Type: application/zip
Size: 4912 bytes
Desc: not available
Url : http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20080307/51e8f42f/PyCQP_interface.py.zip
More information about the CWB
mailing list