Ruby FFI bindings for Hunspell.
Ruby
Latest commit 4b25f5f Jul 5, 2016 @postmodern committed on GitHub Merge pull request #14 from willmoorefyi/support-hunspell-1.4
Update to include hunspell-1.4
Permalink
Failed to load latest commit information.
lib/ffi Update to include hunspell-1.4 Jun 22, 2016
spec Officially require rspec 3.x. Jun 20, 2014
.gemtest Opting into `gem test`. Jan 20, 2011
.gitignore Initial commit. Oct 6, 2010
.rspec
.travis.yml Updated .travis.yml. Jan 14, 2016
.yardopts Initial commit. Oct 6, 2010
ChangeLog.md Actually, we prefer 1.3 over 1.2, but still support 1.2. Jan 14, 2016
LICENSE.txt
README.md Actually, we prefer 1.3 over 1.2, but still support 1.2. Jan 14, 2016
Rakefile
ffi-hunspell.gemspec Updated the gemspec. May 2, 2013
gemspec.yml Actually, we prefer 1.3 over 1.2, but still support 1.2. Jan 14, 2016

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.