Lexicon

A lexicon (word list) implemented in Elixir. This project was inspired by the Lexicon class found in the Stanford C++ libraries.

Installation

To use Lexicon in your Mix projects, first add Lexicon as a dependency:

def deps do
  [{:lexicon, "~> 0.1.3"}]
end

After adding Lexicon as a dependency, run mix deps.get to install it.

Usage

lexicon = Lexicon.new(["cat", "dog"])
lexicon = Lexicon.add("elephant")
true == Lexicon.has_word?(lexicon, "cat")
false == Lexicon.has_prefix?(lexicon, "a")