Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtoy/cld
compact language detection in ruby
https://github.com/jtoy/cld
Last synced: 1 day ago
JSON representation
compact language detection in ruby
- Host: GitHub
- URL: https://github.com/jtoy/cld
- Owner: jtoy
- License: bsd-3-clause
- Created: 2011-11-03T19:29:35.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2023-06-19T12:38:47.000Z (over 1 year ago)
- Last Synced: 2024-10-01T15:18:47.688Z (about 1 month ago)
- Language: C++
- Homepage:
- Size: 3.18 MB
- Stars: 210
- Watchers: 9
- Forks: 67
- Open Issues: 7
-
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
```## Development
- [install CLD](https://github.com/mzsanford/cld#installing)
## Thanks
Thanks to the Chrome authors, and to Mike McCandless for writing a Python version.
Licensed the same as Chrome. Jason Toy