All Projects → segabor → Hunspell

segabor / Hunspell

Licence: LGPL-3.0 License
Ruby wrapper for the famous spell checker library hunspell.

Programming Languages

c
50402 projects - #5 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Hunspell

glimmer-dsl-tk
Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)
Stars: ✭ 26 (-23.53%)
Mutual labels:  rubygem
minitest-matchers vaccine
💉 Adds matcher support to minitest without all the other RSpec-style expectation "infections."
Stars: ✭ 33 (-2.94%)
Mutual labels:  rubygem
n65
An assembler for the 6502 microprocessor written in Ruby
Stars: ✭ 12 (-64.71%)
Mutual labels:  rubygem
dry-transformer
Data transformation toolkit
Stars: ✭ 59 (+73.53%)
Mutual labels:  rubygem
modular routes
Dedicated controllers for each of your Rails route actions.
Stars: ✭ 45 (+32.35%)
Mutual labels:  rubygem
ruby-stream-api
Ruby Stream API. Inspired by Java 8's Stream API.
Stars: ✭ 21 (-38.24%)
Mutual labels:  rubygem
jekyll-target-blank
Automatically opens external links in a new browser for Jekyll Pages, Posts and Docs.
Stars: ✭ 86 (+152.94%)
Mutual labels:  rubygem
capistrano-docker-compose
Docker Compose specific tasks for Capistrano
Stars: ✭ 17 (-50%)
Mutual labels:  rubygem
consul-templaterb
consul-template-like with erb (ruby) template expressiveness
Stars: ✭ 65 (+91.18%)
Mutual labels:  rubygem
ka GE.spell
ქართული ორთოგრაფიული ლექსიკონი - Georgian Spell Checking Dictionary
Stars: ✭ 24 (-29.41%)
Mutual labels:  hunspell
restcountry
This is a Ruby wrapper library around the API provided by REST Countries http://restcountries.eu
Stars: ✭ 32 (-5.88%)
Mutual labels:  rubygem
bootswatch-sass
bootswatch ruby gems for assets pipeline
Stars: ✭ 12 (-64.71%)
Mutual labels:  rubygem
glimmer-dsl-swt
Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
Stars: ✭ 53 (+55.88%)
Mutual labels:  rubygem
benchmark-trend
Measure performance trends of Ruby code
Stars: ✭ 60 (+76.47%)
Mutual labels:  rubygem
strings-truncation
Truncate strings with fullwidth characters and ANSI codes.
Stars: ✭ 45 (+32.35%)
Mutual labels:  rubygem
spacy hunspell
✏️ Hunspell extension for spaCy 2.0.
Stars: ✭ 94 (+176.47%)
Mutual labels:  hunspell
ispell-lt
Lithuanian spellchecking dictionary
Stars: ✭ 26 (-23.53%)
Mutual labels:  hunspell
circleci
CircleCI REST API Ruby Gem
Stars: ✭ 93 (+173.53%)
Mutual labels:  rubygem
npmdc
ruby gem to check for missed NPM dependencies
Stars: ✭ 38 (+11.76%)
Mutual labels:  rubygem
elasticsearch-croatian
Elasticsearch compatible Hunspell dictionary for Croatian.
Stars: ✭ 16 (-52.94%)
Mutual labels:  hunspell

Hunspell Gem Version Build Status

Ruby interface to hunspell spell checker Copyright 2007, Gabor SEBESTYEN

WHAT IS THIS?

Hunspell is an simple 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 installing Hunspell ensure you have the following components already installed:

  • Ruby >= 1.8
  • rubygems
  • hunspell native library >= 1.3 (libhunspell-1.3)
  • dictionary files: download from LibreOffice or OpenOffice websites.

INSTALLATION

The best way to get Hunspell is to use gem package manager

gem install hunspell

NOTE: if install fails on newer OSX versions, try this command

sudo ARCHFLAGS="-arch x86_64" gem install hunspell

If you want to build Hunspell from scratch grab the source from here and execute the following command

ruby extconf.rb && make

FreeBSD gotcha: hunspell spell checker package does not deploy its header files. Run gem or ruby command with an extra option:

gem install hunspell -- --with-include-dir=<incdir>

or

ruby extconf.rb --with-include-dir=<incdir> && make

Replace incdir with the path pointing to hunspell includes.

FIRST STEPS

Here's a basic 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_HU.aff", "hu_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

Note you might run this example with -Ke ruby option if you want to see accented letters instead of backslash prefixed utf codes.

FEEDBACK

Any help or report are warmly appreciated. Please visit the project's homepage at https://github.com/segabor/Hunspell and open an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].