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
/
lm-test.cpp
blob
d8854b24dd920713e11f5260ed8b9e34b8cdb2e8
1
#include
"dictionary.h"
2
#include <iostream>
3
#include <string>
4
5
using namespace
std
;
6
7
int
main
()
8
{
9
dic_init
();
10
11
string s
;
12
vector
<
VocabIndex
>
v
;
13
while
(
cin
>>
s
) {
14
v
.
push_back
(
get_ngram
()[
s
]);
15
}
16
for
(
int
i
=
0
;
i
<
v
.
size
();
i
++) {
17
if
(
i
)
cout
<<
" "
;
18
cout
<<
get_ngram
()[
v
[
i
]];
19
}
20
cout
<<
endl
;
21
return
0
;
22
}