Ruby FFI bindings for Hunspell.
Ruby
Latest commit c5c98da Dec 25, 2016 @postmodern committed on GitHub Merge pull request #20 from oyeanuj/patch-1
Added syntax highlighting
Permalink
Failed to load latest commit information.
lib/ffi
spec Fix name of add_affix method to add_with_affix to agree with hunspell… Nov 17, 2016
.gemtest
.gitignore Initial commit. Oct 6, 2010
.rspec Upgraded to rspec 2.0.0. Oct 11, 2010
.travis.yml Updated .travis.yml. Jan 14, 2016
.yardopts
ChangeLog.md
LICENSE.txt
README.md
Rakefile
ffi-hunspell.gemspec
gemspec.yml

README.md

ffi-hunspell

Build Status

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

Install

$ gem install ffi-hunspell

License

Copyright (c) 2010-2016 Hal Brodigan

See {file:LICENSE.txt} for license information.