diff options
Diffstat (limited to 'test/unit/trie.cc')
-rw-r--r-- | test/unit/trie.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/trie.cc b/test/unit/trie.cc new file mode 100644 index 00000000..41b56c70 --- /dev/null +++ b/test/unit/trie.cc @@ -0,0 +1,14 @@ +#include "../dw/hyphenator.hh" + +int main (int argc, char *argv[]) +{ + if (argc < 2) { + fprintf(stderr, "Usage: trie <pattern file>\n"); + exit (1); + } + + /* Use pack = 1024 to create a really small trie - can take a while. + */ + dw::Hyphenator hyphenator (argv[1], NULL, 1024); + hyphenator.saveTrie (stdout); +} |