Skip to content

Instantly share code, notes, and snippets.

@pat
Created December 17, 2008 09:32
Show Gist options
  • Save pat/37008 to your computer and use it in GitHub Desktop.
Save pat/37008 to your computer and use it in GitHub Desktop.
# quick raspell example
require 'raspell'
speller = Aspell.new("en_US")
speller.suggestion_mode = Aspell::NORMAL
speller.check("threory") #=> false (ie: misspelt)
speller.suggest("threory").first #=> "theory"
speller.suggest("threory") #=> ["theory", "thready", "therefor", "throaty", "throe", "three", "therefore", "Rory", "Theron", "theory's", "throed", "throes", "theorem", "thereby", "thereof", "thereon", "threat", "threes", "throat", "there", "threw", "throw", "therapy", "throb", "throe's", "thievery", "dreary", "priory", "thread", "thresh", "throne", "thrown", "throws", "three's", "thruway", "they're"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment