LanguageDetector
This is a n-gram based language detector (written in ruby) which is based on http://tnlessone.wordpress.com/2007/05/13/how-to-detect-which-language-a-text-is-written-in-or-when-science-meets-human/ and https://github.com/feedbackmine/language_detector
Installation
Add this line to your application's Gemfile:
gem 'ruby_ngrams_language_detector'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby_ngrams_language_detector
Usage
require 'language_detector' detector = LanguageDetector.new detector.detect(file.txt)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request