diff options
Diffstat (limited to 'test/trie.cc')
-rw-r--r-- | test/trie.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/trie.cc b/test/trie.cc new file mode 100644 index 00000000..943b8045 --- /dev/null +++ b/test/trie.cc @@ -0,0 +1,17 @@ +#include "../dw/fltkcore.hh" +#include "../dw/hyphenator.hh" + +int main (int argc, char *argv[]) +{ + dw::fltk::FltkPlatform p; + + 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 (&p, argv[1], NULL, 1024); + hyphenator.saveTrie (stdout); +} |