Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/craig-day/jtoy-cld
https://github.com/craig-day/jtoy-cld
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/craig-day/jtoy-cld
- Owner: craig-day
- License: bsd-3-clause
- Created: 2015-06-25T23:57:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-25T23:58:42.000Z (over 9 years ago)
- Last Synced: 2024-10-19T04:11:16.875Z (3 months ago)
- Language: C++
- Size: 3.29 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compact Language Detection
Blazing-fast language detection for Ruby provided by
Google Chrome's Compact Language Detector.## How to Use
```ruby
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:
```ruby
gem "cld"
```And then execute:
```sh
$ bundle
```## Thanks
Thanks to the Chrome authors, and to Mike McCandless for writing a Python version.
Licensed the same as Chrome. Jason Toy