repo.or.cz
/
vspell.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
softcount: tolerate zero ngrams
[vspell.git]
/
utils
/
dag-test.cpp
blob
a16abcdeab518e7de3f43b5b0c629f9bcaa438a7
1
#include <algorithm>
2
#include <iostream>
3
#include <iterator>
4
#include <spell.h>
5
#include <dag.h>
6
#include <dictionary.h>
7
8
using namespace
std
;
9
10
int
main
(
int
argc
,
char
**
argv
)
11
{
12
get_ngram
().
read
(
argc
==
2
?
argv
[
1
] :
"ngram"
);
13
dic_init
();
14
warch
.
load
(
"wordlist"
);
15
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
;
23
}
24
return
0
;
25
}