ffi-hunspell¶ ↑
-
[Email](postmodern.mod3 at gmail.com)
Description¶ ↑
Ruby FFI
bindings for Hunspell.
Examples¶ ↑
Open a dictionary:
require 'ffi/hunspell' FFI::Hunspell.dict do |dict| # ... end FFI::Hunspell.dict('en_GB') do |dict| # ... end dict = FFI::Hunspell.dict('en_GB') # ... dict.close
Check if a word is valid:
dict.check?('dog') # => true dict.check?('d0g') # => false
Find the stems of a word:
dict.stem('dogs') # => ["dog"]
Suggest alternate spellings for a word:
dict.suggest('arbitrage') # => ["arbitrage", "arbitrages", "arbitrager", "arbitraged", "arbitrate"]
Requirements¶ ↑
-
libhunspell >= 1.2.0
-
ffi ~> 1.0
Install¶ ↑
$ gem install ffi-hunspell
License¶ ↑
Copyright © 2010-2016 Hal Brodigan
See {file:LICENSE.txt} for license information.