| Path: | README.rdoc |
| Last Update: | Thu Dec 22 21:56:18 +0000 2016 |
For technical details about language detection, I recommend this paper:
sudo gem sources -a gems.github.com (you only have to do this once) sudo gem install igrigorik-language_detector
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')