dtrie 1.0.1
Dictionary representation of Trie
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
DTrie
The dictionary representation of the Trie data structure.
Examples
auto dictionary = new Dictionary(["Win", "hot"], ["Lose", "cold"]);
assert(dictionary.get("Win") == ["Lose"]);
assert(dictionary.get("hot") == ["cold"]);
assert(dictionary.get("won") == []);
Multi-byte strings are available.
string[] keys = [
"あけます", "あけます",
"あけました", "あけました",
];
string[] values = [
"開けます", "明けます",
"開けました", "明けました",
];
auto dictionary = new Dictionary(keys, values);
//"あけます" is associated to "開けます" and "明けます"
assert(dictionary.get("あけます") == ["開けます", "明けます"]);
//"あけました" is associated to "開けました" and "明けました"
assert(dictionary.get("あけました") == ["開けました", "明けました"]);
Running Tests
$dmd test.d bitarray.d lib/exception.d lib/random/random.d lib/random/string.d queue.d dtrie.d -unittest
$./test
Documentations can be generated by appending -D option to the compilation command.
- Registered by IshitaTakeshi
- 1.0.1 released 9 years ago
- IshitaTakeshi/DTrie
- MIT
- Copyright © 2015, Ishita Takeshi
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.2 2015-Dec-03 1.0.1 2015-Jul-15 1.0.0 2015-Jul-15 ~master 2016-Jan-07 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
154 downloads total
-
- Score:
- 0.7
- Short URL:
- dtrie.dub.pm