[CWB] Linking CWB and R

Hardie, Andrew a.hardie at lancaster.ac.uk
Thu Nov 24 15:49:28 CET 2011


Hi Sylvain,

This is interesting. I myself have been working on going the other way, i.e. using R from CQPweb as a backend to get interesting graphs and statistics. I ahven't had as much time to work on this as I would have liked, of course.

There is no reason why you couldn't create R functions that call CWB libraries. The existing CL (corpus library) is designed for exactly such undertakings. In the long term, we hope to separate out other functionality like the CQP query syntax into libraries that could be accessed in the same way. There's a lot of work to get to that point, however!

best

Anmdrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Sylvain LOISEAU
Sent: 24 November 2011 09:04
To: cwb at sslmit.unibo.it
Cc: Bernard Desgraupes
Subject: [CWB] Linking CWB and R

Hi,

I'm interested in accessing cwb directly from R, since cwb data structures are vectors and may be very efficiently managed from within R.

I have made a small R implementation of the client interface, allowing for cwb to be accessed through socket connection.

I would be very interested, before going further, in your comments and opinions about another project : liking cwb and R though call to a CWB C library. A CWB library could be linked to a R module (and automatically installed with this module). Rather than being communicated one by one via socket, the vector elements produced by CWB would be represented in C, with a light extension to the existing code, and wrapped with a R vector. Such R vector would simply give access to the original data, without copying any data structure.

I'm sure some of you have already thought about that and maybe there is well known drawbacks or misconception in this project.

Best regards,
Sylvain Loiseau
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list