I am looking for an automatic language identification tool written in php. The tool should receive as input a string, and output the name of the (natural) language the string is written in. A perl example is TextCat, ported to Java by Knallgrau New Media Solutions. Does anyone know of a PHP port? Or another similar PHP tool?
+1
A:
Not in php, unfortunately. But maybe you'll give half-credit for Natural Language Processing in Python, which is by far the most extensive NLP resource I've come across, with a tutorial in Python built in. And Python is closer to plug-compatible with php than either perl or java.
le dorfier
2008-12-14 07:58:22
Thanks. BTW, I think you sent a local link instead of an HTTP URL. If worst comes to worst, I will google for the python resource...
Yuval F
2008-12-14 08:05:17
Fixed. Thanks :(
le dorfier
2008-12-14 08:07:15
+5
A:
You can use Pear package Text_LanguageDetect. It recognizes 52 natural languages using 3-gram frequencies.
link0ff
2008-12-14 22:24:50