News for hackers. Stuff that matters.
Re:Language detection with Google's Compact Language Detector by dangoldin on Saturday October 22, 2011 @11:43AM (#3143694)
Nice. I've been using a call to the Google online translator to achieve the same result - http://ajax.googleapis.com/ajax/services/language/translate?...
Re:Language detection with Google's Compact Language Detector by toisanji on Saturday October 22, 2011 @03:48PM (#3144183)
are there published api limits on this service?
Re:Language detection with Google's Compact Language Detector by dangoldin on Saturday October 22, 2011 @10:05PM (#3144925)
I'm not aware of them. I'm using this in a high volume/non critical capacity and it seems to be okay. I should keep better stats though.
Re:Language detection with Google's Compact Language Detector by tha-dude on Saturday October 22, 2011 @08:45AM (#3143438)
Nice! I wrote a .NET wrapper myself, never got around to a Python extension though. One question - did you experience any memory leak issues with the CLD? Said, .NET wrapper DLL seems to leak and I never really checked if it was the C++/CLI I added on top or the actual CLD native C++ code. I doubt the latter since (according to my basic understanding) nothing is created in the original code which needs to be cleaned up manually. Before I start debugging mixed-mode .NET applications I just wanted to be sure.
Re:Language detection with Google's Compact Language Detector by lstrojny on Saturday October 22, 2011 @06:34PM (#3144491)
Great library! Here are bindings for PHP: https://github.com/lstrojny/php-ccld
Re:Language detection with Google's Compact Language Detector by sick-boy on Saturday October 22, 2011 @07:28AM (#3143340)
"You must provide it clean (interchange-valid) UTF-8, so any encoding issues must be sorted out before-hand."

In most cases you have to know the language in order to guess the encoding and convert to UTF-8 if necessary. Mutual recursion...

Re:Language detection with Google's Compact Language Detector by adambyrtek on Saturday October 22, 2011 @08:51AM (#3143442)
Encoding, but obviously not language, should be provided explicitly as metadata (e.g. Content-Type HTTP header). Also, most of content available on the web is already UTF-8 (65.9% according to a recent survey[1]).

[1] http://w3techs.com/technologies/details/en-utf8/all/all

Re:Language detection with Google's Compact Language Detector by ninjin on Saturday October 22, 2011 @11:12AM (#3143642)
Mark Pilgrim reversed (or ripped out, can't remember) the encoding detection that Firefox uses. It has done a fairly good job for my web crawling:

http://pypi.python.org/pypi/chardet

Re:Language detection with Google's Compact Language Detector by e98cuenc on Saturday October 22, 2011 @11:20AM (#3143655)
In my experience chardet misclassifies very often iso-8859-1 as iso-8859-2. I saw the misclassification even in small spanish pages, which were using only the typical spanish characters.
Re:Language detection with Google's Compact Language Detector by Maakuth on Saturday October 22, 2011 @07:36AM (#3143356)
I'd say in most cases UTF-8 is already used. Of course this depends on the source of the text.
Re:Language detection with Google's Compact Language Detector by johnx123-up on Saturday October 22, 2011 @07:45AM (#3143371)
I thought that the detection is easier with Unicode ordinal value map table
Re:Language detection with Google's Compact Language Detector by abhaga on Saturday October 22, 2011 @09:50AM (#3143502)
I am assuming it will recognize languages even when they are using the same character sets. No?