This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit be421f7cb882baa5dfd1da12f3e0a25ce11d1c03
tree e6b1e2b86a5e43a8b2b3ec84fd191714efddf240
parent 7568e92c7df77101dffb9cdce30c95984bb4124b
tree e6b1e2b86a5e43a8b2b3ec84fd191714efddf240
parent 7568e92c7df77101dffb9cdce30c95984bb4124b
raspell /
| name | age | message | |
|---|---|---|---|
| |
CHANGELOG | Wed Aug 08 08:17:03 -0700 2007 | |
| |
LICENSE | Tue Feb 05 02:33:16 -0800 2008 | |
| |
Manifest | Fri Aug 10 17:23:59 -0700 2007 | |
| |
README | Tue Feb 05 02:29:15 -0800 2008 | |
| |
Rakefile | Sun Sep 16 19:49:41 -0700 2007 | |
| |
ext/ | Thu Aug 02 22:24:40 -0700 2007 | |
| |
lib/ | Fri Aug 03 01:12:18 -0700 2007 | |
| |
test/ | Thu Aug 02 19:00:20 -0700 2007 |
README
raspell An interface binding for the Aspell spelling checker. == License Copyright 2007, 2008 Cloudburst, LLC. Licensed under the GPL 2.0. See included LICENSE file. Portions copyright 2005 Matthias Veit, Biro Eszter and used with permission. The public certificate for the gem is here[http://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem]. If you use this software, please {make a donation}[http://blog.evanweaver.com/donate/], or {recommend Evan}[http://www.workingwithrails.com/person/7739-evan-weaver] at Working with Rails. == Requirements Raspell requires Aspell version 0.6 (http://www.aspell.net) and at least one Aspell dictionary. Mac: sudo port install aspell aspell-dict-en Ubuntu: sudo apt-get install aspell libaspell-dev aspell-en == Installation Mac: sudo gem install raspell -- --with-opt-dir=/opt/local Ubuntu: sudo gem install raspell == Usage Aspell lets you <tt>check</tt> words and <tt>suggest</tt> corrections. For example: require 'rubygems' require 'raspell' speller = Aspell.new("en_US") speller.suggestion_mode = Aspell::NORMAL string = "my haert wil go on" string.gsub(/[\w\']+/) do |word| if !speller.check(word) # word is wrong puts "Possible correction for #{word}:" puts speller.suggest(word).first end end This outputs: Possible correction for haert: heart Possible correction for wil: Will Note that <tt>suggest</tt> returns an array of suggestions even for words that are correctly spelled. == Options The most useful options are <tt>suggestion_mode</tt>, and the passthrough option <tt>ignore_case</tt>. Passthrough options have to be set as so: speller.set_option("ignore-case", "true") See http://aspell.net/man-html/The-Options.html for a list of the passthrough options. == Reporting problems The support forum is here[http://rubyforge.org/forum/forum.php?forum_id=13988]. Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC. == Futher resources * http://blog.evanweaver.com/articles/2007/03/10/add-gud-spelning-to-ur-railz-app-or-wharever







