Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby FFI interface to the Hunspell spelling checker – This is rather unmaintained. Consider using https://github.com/postmodern/ffi-hunspell
Ruby
tree: 8ca7c7447c

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
CHANGES
Gemfile
Gemfile.lock
README.rdoc
Rakefile
hunspell-ffi.gemspec

README.rdoc

hunspell-ffi

A Ruby FFI interface to the Hunspell spelling checker

It should work wherever Ruby FFI works (tested on Ruby 1.9.2, 1.8.7, JRuby 1.5.1).

Installation

Install Hunspell

On Mac OS X: Hunspell (libhunspell) is already installed on OSX 10.6.

On Debian:

apt-get install hunspell

Install the Gem

gem install hunspell-ffi

Usage

require 'hunspell-ffi'
dict = Hunspell.new("path/to/cakes.aff", "path/to/cakes.dic")
dict.spell("Baumkuchen")    # => true  same as #check
dict.spell("Bomcuken")      # => false
dict.suggest("Baumgurken")  # => ["Baumkuchen"]
dict.suggest("qwss43easd")  # => []

# Modify the run-time dictionary:
dict.add("Geburtstagskuchen")
dict.remove("Fichte")

Author

Andreas Haller andreashaller@gmail.com

License

Hereby placed under public domain, do what you want, just do not hold me accountable…

TODO

Add hunspell analyzing methods (analyze, stem …)

Test on Windows

Something went wrong with that request. Please try again.