SpellChex
Created as an experiment to learn how to build libraries in Elixir to extract common functionality across projects.
The primary purpose to have an efficient way to determine if a word is in a language.
The library will ship with a list of English words, but will have an easy mechanism to load other word sets to both support other languages and specialized cases like jargon, proper names, nsfw words, etc
Usage
> SpellChex.exists?("dog")
true
> SpellChex.exists?("asdfasdf")
falseInstallation
If available in Hex, the package can be installed
by adding spell_chex to your list of dependencies in mix.exs:
def deps do
[
{:spell_chex, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/spell_checker.
Adding Words from txt file
awk '{ for (i=1; i<=NF; i++) print tolower($i) }' book.txt > words.txt
cat words.txt | sort | uniq > add_words.txt
cat priv/en.txt add_words.txt | sort | uniq > en_update.txt