softcount: tolerate zero ngrams
[vspell.git] / utils / dag-test.cpp
bloba16abcdeab518e7de3f43b5b0c629f9bcaa438a7
1 #include <algorithm>
2 #include <iostream>
3 #include <iterator>
4 #include <spell.h>
5 #include <dag.h>
6 #include <dictionary.h>
8 using namespace std;
10 int main(int argc, char **argv)
12 get_ngram().read(argc == 2 ? argv[1] : "ngram");
13 dic_init();
14 warch.load("wordlist");
16 int count = 0;
17 while (!cin.eof()) {
18 if (++count % 200 == 0) cerr << count << endl;
19 Lattice l;
20 cin >> l;
21 WordDAG dag(&l);
22 cout << dag << endl;
24 return 0;