hunspell
Version, currently 0.1.02 versions
- 0.1.1latestFeb 12, 2021
- 0.1.0not indexedMar 23, 2021
github.com/postmodern/hunspell.cr
Crystal bindings for libhunspell. Crystal port of the Ruby ffi-hunspell gem.
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
hunspell:
github: postmodern/hunspell.cr
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
hunspell.cr
- Source
- Issues
- Documentation
- [Email](postmodern.mod3 at gmail.com)
Crystal bindings for Hunspell. Crystal port of the Ruby ffi-hunspell gem and should be API compatible.
Installation
-
Install
libhunspell-
Debian / Ubuntu:
$ sudo apt install libhunspell-dev hunspell-en-us -
RedHat / Fedora:
$ sudo dnf install hunspell-devel hunspell-en -
macOS:
$ brew install hunspell
-
-
Add the dependency to your
shard.yml:dependencies: hunspell: github: your-github-user/hunspell.cr -
Run
shards install
Examples
Open a dictionary:
require "hunspell"
Hunspell.dict do |dict|
# ...
end
Hunspell.dict("en_GB") do |dict|
# ...
end
dict = Hunspell.dict("en_GB")
# ...
dict.close
Check if a word is valid:
dict.check?("dog")
# => true
dict.check?("d0g")
# => false
Find the stems of a word:
dict.stem("dogs")
# => ["dog"]
Suggest alternate spellings for a word:
dict.suggest("arbitrage")
# => ["arbitrage", "arbitrages", "arbitrager", "arbitraged", "arbitrate"]
Development
After installing libhunspell (see Installation):
$ shards install
$ crystal spec
Contributing
- Fork it (https://github.com/postmodern/hunspell.cr/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
- Postmodern - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Mar 23, 2021
- Commit
3f43120293ca- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/postmodern/hunspell.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 2