[CWB] Cannot build CWB::CL

Stefan Evert stefanML at collocations.de
Wed Sep 15 13:29:24 CEST 2010


> I'm trying to build CWB::CL (which is needed by CWB::Web::Query), but compilation fails with the following:
> 
> 	CL.xs: In function ‘XS_CWB__CL_cl_normalize’:
> 	CL.xs:302: error: too few arguments to function ‘cl_string_canonical’
> 
> I looked into the code, and here's how CL.xs calls cl_string_canonical:
> 
> 	cl_string_canonical(s_norm, flags);
> 
> And then I found the definition of cl_string_canonical in cwb/trunk/cl/cl.h:
> 
> 	void cl_string_canonical(char *s, CorpusCharset charset, int flags);
> 
> So, it seems like CWB::CL isn't updated to handle the CorpusCharset... Any suggestions on what to do now?
> 
> Btw, I'm using the latest SVN code (rev 188)

Yes, that's something I've been gnashing my teeth about, too.  The CWB/Perl modules haven't been updated for compatibility with the beta version 3.2 of the CWB yet.

I'd like to ask you for some patience until CWB/Perl 3.0 has been completed and released, then we can fork a branch and start rewriting the main trunk for CWB 3.2.

It isn't as easy as changing a few function calls (which breaks compatibility with all previous CWB releases, of course): currently the CWB/Perl interface is unaware of character sets and treats all CWB data as byte sequences.  Since CWB 3.2 is much stricter on this issue and forces character encoding to be declared explicitly, it makes sense to change the CWB/Perl interface so that strings are automatically recoded to Perl's internal Unicode representation, making the full Unicode power of Perl available to programmers without having them go through additional hoops.

@Andrew: is there documentation on API changes from 3.0 to 3.2? If we expect the two versions to coexist, we could also define a macro in the headers that specifies the API version, so the CWB/Perl modules and other APIs could be made to work with both releases.

Best wishes,
Stefan


More information about the CWB mailing list