Skip to content

skorfmann/detect-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Detect Language This little library can be trained to detect different languages by dropping arbitary text files in the corresponding languages into the "lang" directory.

The actual language detection is performed by the babel gem, which is based on the n-gram approach by Cavnar and Trenkle.

Quickstart

git clone https://github.com/skorfmann/detect-language.git
cd detect-language
bundle install
bundle exec rspec
./bin/detect-language ./lang/gaelic.1
=> detected language: gaelic

Detect language of a file

Use one of the training files for example:

bin/detect-language ./lang/german.1
=> detected language: german

Run the specs

bundle exec rspec

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages