aboutsummaryrefslogtreecommitdiff
path: root/test/trie.cc
blob: 628daabfc084a7ebd5eaddf6f8377622db6cbc83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
}