1 #include "config.h" // -*- tab-width: 2 -*-
11 using namespace Dictionary
;
15 void check1(Sentence
&st
,Suggestions
&sugg
)
17 int i
,n
= st
.get_syllable_count();
18 for (i
= 0;i
< n
;i
++) {
19 strid id
= st
[i
].get_cid();
20 if (sarch
.in_dict(id
))
25 VocabString s
= sarch
[id
];
26 if (strlen(s
) == 1 && viet_isupper(s
[0]) && viet_islower(s
[0])) {
27 st
[i
].sid
= sarch
["<PUNCT>"];
37 void check2(Sentence
&st
,Segmentation
&seg
,Suggestions
&sugg
)
39 int i
,n
= seg
.items
.size();
42 for (i
= 0;i
< n
;i
++) {
44 int len
= seg
.items
[i
].state
->get_syllable_count();
51 WordNodePtr
node(get_root());
52 for (start
= 0;start
< len
&& node
!= NULL
; start
++)
53 node
= node
->get_next(st
[start
+cc
].cid
);