Class: YandexMystem::Simple
Constant Summary collapse
- ARGUMENTS =
'-e utf-8 -n --format json'
Class Method Summary collapse
Methods inherited from Base
command, command_postfix, stem
Class Method Details
.parse(data) ⇒ Object
52 53 54 |
# File 'lib/yandex_mystem.rb', line 52 def self.parse(data) Hash[ JSON.parse('[' + data.split("\n").join(",") + ']', :symbolize_names => true).inject([]){|s, h| s + [[ h[:text], h[:analysis].map{|a| a[:lex]} ]]} ] end |