Sha256: fd9121cae962b82ca95f0bf209c2d43cbdd59a1afa968ed5c14fa8a4ccc877a9

Contents?: true

Size: 1.86 KB

Versions: 2

Compression:

Stored size: 1.86 KB

Contents

Hunspell
Ruby interface to hunspell spell checker

Copyright 2007, Gabor SEBESTYEN


WHAT IS THIS?
-------------

Hunspell is an easy native Ruby interface to the famous Hunspell spell checker
library which is part of OpenOffice and Mozilla products. With this bundle
you can start to develop your own AJAX based spell checker service for
Ruby on Rails.


REQUIREMENTS
------------

Before install Hunspell be sure to have the following components:

- Ruby 1.8.x
- rubygems
- hunspell 1.1.x (libhunspell-1.1)
    http://hunspell.sourceforge.net
- dictionary files for Hunspell
    http://wiki.services.openoffice.org/wiki/Dictionaries


INSTALLATION
------------

The best way is to use gem package manager.

	gem install hunspell

If you want to build Hunspell from scratch grab the source and issue the
following commands:

  ruby extconf.rb && make


FIRST STEPS
-----------

Here's a very simple example how to use Hunspell. Cut it and run in ruby.


=== example.rb ===

require "rubygems" # import gem package manager
gem "hunspell"     # load Hunspell module
require "Hunspell" # inject Hunspell class to Ruby namespace

# instantiate Hunspell with Hungarian affix and dictionary files
#
sp = Hunspell.new("hu.aff", "hu.dic") 

# spell check Hungarian word 'ablak' (window) => true
#
puts "Is 'ablak' correct? #{sp.spellcheck('ablak')}"

# get suggestions for mispelled word 'paprika'
#   => ["kaprica", "patrica", "paprika", "papcica",
#       "papráca", "papruca", "paprima", "paprikáz",
#       "paprikása", "paprikás", "Papradnó"
#      ]
#
puts "Suggestions for 'paprica': " + sp.suggest("paprica").inspect

=== end of example ===


FEEDBACK
--------

Any help or report warmly appreciated. Please visit the project's homepage at
http://hunspell.rubyforge.org or write me to segabor@gmail.com


DISCLAIMER
----------

This software is at an early stage. Use at own your risk!
No warranty.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hunspell-0.1 README
hunspell-0.1.1 README