Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ruby language detection library using n-gram
branch: master

This branch is even with igrigorik:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
README.rdoc
Rakefile
VERSION
language_detector.gemspec

README.rdoc

N-Gram Language Detection in Ruby

For technical details about language detection, I recommend this paper:

Usage

require 'language_detector'

# using generated model (built from scratch)
d = LanguageDetector.new
p d.detect('this text is in English')

# using textcat n-gram model
d = LanguageDetector.new('tc')
p d.detect('this text is in English')

Thanks

Something went wrong with that request. Please try again.