New Lingua::Identify::CLD

As if I did not have enough modules to take care already, I just started a new one. It is still on its beta version as I did not have much time to test it, and write a decent API. It is available in the usual place: https://metacpan.org/release/AMBS/Lingua-Identify-CLD-0.01_01

This is an interface to a library by Google for language detection. As far as I could understand, it is part of the Chrome browser, and was just released as open source. Details here: http://code.google.com/p/chromium-compact-language-detector/

It is available at GitHub, and I am happy to receive issues or pull requests. Just bear in mind that no API is still defined (although I have an idea of what I want) and that I do not have much time to solve your issues right ahead.

Finally, a thanks to Jean Véronis that pointed me the library and asked kindly for a Perl interface to it.

5 Comments

I had the following problems with it:

Using cpanm, the dependency ExtUtils::LibBuilder didn't get followed, for some reason, although it seems to be in Build.PL.

I installed the module using the github source code and was able to build and test it.

However, after it was installed manually from the source code, the shared library would not load:

Can't load '/home/ben/software/install/lib/perl5/site_perl/5.12.3/i386-freebsd/auto/Lingua/Identify/CLD/CLD.so' for module Lingua::Identify::CLD: Shared object "libcld.so" not found, required by "CLD.so" at /home/ben/software/install/lib/perl5/site_perl/5.12.3/i386-freebsd/XSLoader.pm line 71.
 at /home/ben/software/install/lib/perl5/site_perl/5.12.3/i386-freebsd/Lingua/Identify/CLD.pm line 21

I cannot see in the build script Build.PL where the library is even installed.

Hi,

From source I see that library as well has encodings information. Can it guess or only transforms/use for purpose of language detection?

If it can guess then it would be cool to compare with Encode::Detect::Detector that uses Gecko's library that detects encodings when those are not provided. If it can not then both will run smooth together.

Anyway, good to have this around. Thanks.

Leave a comment

About Alberto Simões

user-pic I blog about Perl. D'uh!