1 #include "propername.h"
7 #include <dictionary.h>
11 int main(int argc
, char **argv
)
14 bool use_fuzzy
= false;
16 for (int i
= 1;i
< argc
;i
++) {
17 if (string(argv
[i
]) == "-r")
19 if (string(argv
[i
]) == "--sentence" || string(argv
[i
]) == "2")
21 if (string(argv
[i
]) == "--token" || string(argv
[i
]) == "1")
23 if (string(argv
[i
]) == "--fuzzy")
27 warch
.load("wordlist");
31 if (++count
% 200 == 0) cerr
<< count
<< endl
;
36 switch (revert_level
) {
37 case 0: cout
<< words
<< endl
; break;
38 case 1: cout
<< *words
.st
<< endl
; break;
39 case 2: cout
<< words
.st
->get() << endl
; break;
44 WordStateFactories factories
;
45 ExactWordStateFactory exact
;
46 LowerWordStateFactory lower
;
47 FuzzyWordStateFactory fuzzy
;
48 factories
.push_back(&exact
);
49 factories
.push_back(&lower
);
51 factories
.push_back(&fuzzy
);
52 words
.pre_construct(st
,wes
,factories
);
53 mark_proper_name(st
,wes
);
54 words
.post_construct(wes
);
55 cout
<< words
<< endl
;