GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - evan/raspell: A Ruby binding for the Aspell spelling checker

BranchesTags
Open more actions menu

Latest commit

 

History

53 Commits
53 Commits

Folders and files

NameName
Last commit message
Last commit date
ext
ext
 
 
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CHANGELOG
CHANGELOG
 
 
LICENSE
LICENSE
 
 
Manifest
Manifest
 
 
README.rdoc
README.rdoc
 
 
Rakefile
Rakefile
 
 

Repository files navigation

raspell

An interface binding for the Aspell spelling checker.

Deprecated

This gem is unmaintained. Please use ffi-aspell instead.

License

Copyright 2007-2012 Cloudburst, LLC. Licensed under the GPL 2.0. See included LICENSE file. Portions copyright 2005 Matthias Veit, Biro Eszter and used with permission.

Requirements

Raspell requires Aspell version 0.6 (www.aspell.net) and at least one Aspell dictionary.

MacPorts:

port install aspell aspell-dict-en

Homebrew:

brew install aspell --lang=en

Ubuntu:

apt-get install aspell libaspell-dev aspell-en

Installation

Mac:

gem install raspell -- --with-opt-dir=/opt/local

Ubuntu:

gem install raspell

Usage

Aspell lets you check words and suggest 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 suggest returns an array of suggestions even for words that are correctly spelled.

Options

The most useful options are suggestion_mode, and the passthrough option ignore_case. Passthrough options have to be set as so:

speller.set_option("ignore-case", "true")

See aspell.net/man-html/The-Options.html for a list of the passthrough options.

Reporting problems

The support forum is here.

Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC.

Futher resources

  • blog.evanweaver.com/articles/2007/03/10/add-gud-spelning-to-ur-railz-app-or-wharever

About

A Ruby binding for the Aspell spelling checker

fauna.github.com/fauna/raspell

Resources

Readme
License
Activity

Stars

59 stars

Watchers

6 watching

Forks

22 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.