How to pick english sentences between many languages?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: How to pick english sentences between many languages?

Post by requinix »

My PHP answer would be "check if the binary string length doesn't match the multibyte string length", but I don't how close you can get to that with Postgre (not counting doing all the work in PHP).
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How to pick english sentences between many languages?

Post by onion2k »

There's a class in PEAR called Text_LanguageDetect that does want you want. It works pretty well. http://pear.php.net/manual/en/package.t ... detect.php
Post Reply