jtoy / cld

compact language detection in ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compact Language Detection

Blazing-fast language detection for Ruby provided by Google Chrome's Compact Language Detector.

How to Use

CLD.detect_language("This is a test")
# => {:name => "ENGLISH", :code => "en", :reliable => true}

CLD.detect_language("plus ça change, plus c'est la même chose")
# => {:name => "FRENCH", :code => "fr", :reliable => true}

Installation

Add this line to your application's Gemfile:

gem "cld"

And then execute:

$ bundle

Development

Thanks

Thanks to the Chrome authors, and to Mike McCandless for writing a Python version.

Licensed the same as Chrome. Jason Toy

About

compact language detection in ruby

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 91.6%Language:C 3.9%Language:Shell 3.8%Language:Makefile 0.6%Language:Ruby 0.1%Language:M4 0.0%Language:Batchfile 0.0%