crystal-hunspell alternatives and similar shards
Based on the "C bindings" category.
Alternatively, view crystal-hunspell alternatives based on common mentions on social networks and blogs.
-
clang.cr
libclang bindings for crystal (including automatic C bindings generator) -
asound-cr
ALSA/libasound bindings for sound programming in Crystal language.
Static code analysis for 29 languages.
Do you think we are missing an alternative of crystal-hunspell or a related project?
README
crystal-hunspell
Crystal bindings for Hunspell.
Installation
Before installing crystal-hunspell
ensure you have hunspell already installed:
- Add the dependency to your
shard.yml
:
dependencies:
hunspell:
github: mamantoha/crystal-hunspell
- Run
shards install
Usage
require "hunspell"
Open a dictionary:
hunspell = Hunspell.new("/usr/share/hunspell/en_US.aff", "/usr/share/hunspell/en_US.dic")
or
hunspell = Hunspell.new("en_US")
Check if a word is valid:
hunspell.spellcheck("crystal")
# => true
hunspell.spellcheck("cristal")
# => false
Find the stems of a word:
hunsell.stem("fishing")
# => ["fishing", "fish"]
Suggest alternate spellings for a word:
hunspell.suggest("arbitrage")
# => ["arbitrage", "arbitrages", "arbitrager", "arbitraged", "arbitrate"]
Development
Generate bindings for Hunspell
crystal ./lib/crystal_lib/src/main.cr -- src/hunspell/lib_hunspell.cr.in
Contributing
- Fork it (https://github.com/mamantoha/crystal-hunspell/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Anton Maminov - creator and maintainer
*Note that all licence references and agreements mentioned in the crystal-hunspell README section above
are relevant to that project's source code only.