We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get this to work, not sure if it's a UTF8 issue or what.
require 'ffi/hunspell' c= FFI::Hunspell.dict('ru_RU') p c.stem("рассчитывал") #-> []
command line using hunspell binary: textmining|master⚡ ⇒ echo рассчитывал | hunspell -d ru_RU -s рассчитывал рассчитывать
The text was updated successfully, but these errors were encountered:
Works for me (my locale is UTF-8)
require 'ffi/hunspell' dict = FFI::Hunspell.dict('ru_RU') dict.valid? "рассчитывал" #=> true dict.encoding #=> #<Encoding:UTF-8> dict.stem "рассчитывал" #=> ["рассчитывать"]
Sorry, something went wrong.
@houshuang what does __ENCODING__ return in irb? What is the output of the locale command?
__ENCODING__
irb
locale
Yeah, this is encoding problems:
On Ubuntu 17.04 (hunspell 1.4.1-2build1):
dict = FFI::Hunspell.dict('ru_RU') dict.encoding # => #<Encoding:KOI8-R (autoload)> dict.suggest('ощибка') # => [] dict.suggest('ощибка'.encode(dict.encoding)).map { |s| s.encode(__ENCODING__) } # => ["ощипка", "ошибка"]
No branches or pull requests
Can't get this to work, not sure if it's a UTF8 issue or what.
require 'ffi/hunspell'
c= FFI::Hunspell.dict('ru_RU')
p c.stem("рассчитывал") #-> []
command line using hunspell binary:
textmining|master⚡ ⇒ echo рассчитывал | hunspell -d ru_RU -s
рассчитывал рассчитывать
The text was updated successfully, but these errors were encountered: