Babylon

Build Status Documentation Status License: MIT

Babylon is the simplest, easiest-to-use language detector.

Install

Via composer:

$ composer require programarivm/babylon

Instantiation

Instantiate a LanguageDetector to detect a text's language.

use Babylon\LanguageDetector;

$text = 'You will have your data soon, I remarked, pointing with my finger;
        this is the Brixton Road, and that is the house, if I am not very much
        mistaken.';

$isoCode = (new LanguageDetector($text))->detect();

Note: The text needs to be a few words length in order for the language to be detected correctly; otherwise false positives may take place.

Language Detection

Please read the Documentation to find out which languages can be detected so far, and also to learn how to add new ones easily.

License

The MIT License.

Contributions

Would you help make this library better? Contributions are welcome.

  • Feel free to send a pull request
  • Drop an email at info@programarivm.com with the subject "Babylon Contributions"
  • Leave me a comment on Twitter
  • Say hello on Google+

Many thanks.