Created
July 16, 2012 11:34
-
-
Save whiter4bbit/3122239 to your computer and use it in GitHub Desktop.
whatlanguage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whiter4bbit@mac-mini-pavel ~ $ gem install whatlanguage | |
Fetching: whatlanguage-1.0.0.gem (100%) | |
Successfully installed whatlanguage-1.0.0 | |
1 gem installed | |
Installing ri documentation for whatlanguage-1.0.0... | |
Installing RDoc documentation for whatlanguage-1.0.0... | |
whiter4bbit@mac-mini-pavel ~ $ irb | |
1.9.2p290 :001 > require 'whatlanguage' | |
=> true | |
1.9.2p290 :002 > wl = WhatLanguage.new(:all) | |
=> #<WhatLanguage:0x007fe9ca843c10> | |
1.9.2p290 :003 > wl.process_text("Как ваши дела?") | |
=> {:french=>1, :spanish=>1, :russian=>2, :portuguese=>1} | |
1.9.2p290 :004 > wl.process_text("Ебать мои старые костыли!") | |
=> {:russian=>3, :french=>2} | |
1.9.2p290 :005 > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment