Simple::Trie - Trie, it's simple
version 0.01
$trie = Simple::Trie->new(words => [ qw(foo bar food) ] ); $trie->add('baz'); say "Found foo" if $trie->find('foo'); my @results = $trie->smart_find('f');
This is an implementation of a Trie, but it's not very sophisticated. This was done as a way for myself to become more aquainted with the algorithm described here http://en.wikipedia.org/wiki/Trie
The current set of words during initializion.
Will add a word to the trie.
Will return true if the word is found in the trie.
Will return a list of found words that match.
Moo
Logan Bell <loganbell@gmail.com>
This software is copyright (c) 2013 by Logan Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Simple::Trie, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Simple::Trie
CPAN shell
perl -MCPAN -e shell install Simple::Trie
For more information on module installation, please visit the detailed CPAN module installation guide.