Skip to content

romanbsd/hunspell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby bindings for Hunspell 1.2.x

This version expects to receive the word in UTF-8 encoding, and it will then use iconv behind the scenes in order to convert to and from the dictionary encoding.

Usage

prefix = '/usr/share/myspell/'  # Fedora
speller = Hunspell.new(prefix + 'en_US.aff', prefix + 'en_US.dic')
speller.valid?('dog')           # -> true
speller.valid?('dpg')           # -> false
speller.suggest('dpg')          # -> ["dog", "dg", "pg", "deg", "dig", ...]

Copyright 2011 Roman Shterenzon, released under the MIT license

About

Ruby bindings to Hunspell 1.2.x with iconv support

Resources

Stars

Watchers

Forks

Packages

No packages published