Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/craig-day/ruby_cld2
Ruby Wrapper for Google CLD2
https://github.com/craig-day/ruby_cld2
Last synced: 20 days ago
JSON representation
Ruby Wrapper for Google CLD2
- Host: GitHub
- URL: https://github.com/craig-day/ruby_cld2
- Owner: craig-day
- License: mit
- Created: 2014-12-08T22:42:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-18T21:39:43.000Z (almost 10 years ago)
- Last Synced: 2024-10-19T04:11:08.974Z (3 months ago)
- Language: Ruby
- Size: 73.3 MB
- Stars: 4
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compact Language Detection for Ruby
This is a ruby wrapper for Google [Compact Language Detector 2](https://code.google.com/p/cld2/).
## Usage
a. Include the Gem
```ruby
gem 'ruby_cld2', :git => '[email protected]:craig-day/ruby_cld2.git'
```
b. Call the function on a given string.
```ruby
require 'cld2'
#...
CLD2.detect_language("Hola mis amigos!")
=> {:name => "SPANISH", :code => "es", :reliable => true}
```### Source
To get the source used to compile `ext/lib/libcld2.so` and `ext/lib/libcld2_full.so`
```
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://cld2.googlecode.com/svn/trunk/ cld2-read-only
```