Codebase list dillo / 462034fd-d4de-4c08-a0cd-5a55f76ebc5c/main test / trie.cc
462034fd-d4de-4c08-a0cd-5a55f76ebc5c/main

Tree @462034fd-d4de-4c08-a0cd-5a55f76ebc5c/main (Download .tar.gz)

trie.cc @462034fd-d4de-4c08-a0cd-5a55f76ebc5c/mainraw · history · blame

#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);
}