Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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: ed909e8b23

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
CHANGES
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

1. Install hunspell (OSX: 'brew install hunspell' Debian: 'apt-get install hunspell')
2. 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.