Sha256: 60f1ec8f675f53a1a431fdc2bdfd6a55b83ef58234c4234419a8baeb1f5bd522

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

# ffi-hunspell

* [github.com/postmodern/ffi-hunspell](http://github.com/postmodern/ffi-hunspell)
* [github.com/postmodern/ffi-hunspell/issues](http://github.com/postmodern/ffi-hunspell/issues)
* Postmodern (postmodern.mod3 at gmail.com)

## Description

Ruby FFI bindings for [Hunspell](http://hunspell.sourceforge.net/).

## Examples

Open a dictionary:

    require 'ffi/hunspell'
    
    dict = FFI::Hunspell.dict('/usr/share/myspell/en_US')
    # ...
    dict.close

    FFI::Hunspell.dict('/usr/share/myspell/en_US') do |dict|
      # ...
    end

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](http://hunspell.sourceforge.net/) >= 1.2.0
* [ffi](http://github.com/ffi/ffi) ~> 0.6.0

## Install

    $ sudo gem install ffi-hunspell

## License

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffi-hunspell-0.1.0 README.md