This repository was archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Rails plugin to detect the language of a given string
License
porras/language_detection
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
= LanguageDetection Rails plugin It adds +language+ method to String class. It uses Classifier (<tt>gem install classifier</tt>) to try to detect the language, based on the samples present in <tt>RAILS_ROOT/lang/<lang>/*.txt</tt>. This path is configurable: LanguageDetection::LanguageClassifier.samples_dir = "/another/path" To detect the language of a string, simply use the +language+ method: > "hola".language => "es" > "hello".language => "en" Remember this is a bayesian filter, so: * Results are not bullet-proof * And depends on the size and quality of your samples Copyright (c) 2008 Sergio Gil, released under the MIT license
About
Rails plugin to detect the language of a given string
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published