1:
2: #ifndef _convdb_h_included_
3: #define _convdb_h_included_
4:
5: #include <anthy/anthy.h>
6:
7:
8: #define CHK_UNKNOWN 0
9: #define CHK_OK 1
10: #define CHK_MISS 2
11: #define CHK_DONTCARE 3
12:
13:
14: #define CONV_OK 0
15: #define CONV_SIZE_MISS 1
16: #define CONV_CAND_MISS 2
17: #define CONV_INVALID 4
18:
19:
20: struct conv_res {
21:
22: char *src_str;
23: char *res_str;
24:
25: char *cand_str;
26:
27: int *cand_check;
28:
29: int check;
30: int used;
31:
32: struct conv_res *next;
33: };
34:
35:
36: struct res_stat {
37: int unknown;
38: int ok;
39: int miss;
40: int dontcare;
41: };
42:
43:
44: struct res_db {
45:
46: struct conv_res res_list;
47: struct conv_res *tail;
48:
49: int total;
50: struct res_stat res, split;
51: };
52:
53: struct res_db *create_db(void);
54: void read_db(struct res_db *db, const char *fn);
55: struct conv_res *find_conv_res(struct res_db *db, anthy_context_t ac,
56: const char *src, int conv);
57: void print_size_miss_segment_info(anthy_context_t ac, int nth);
58: void print_cand_miss_segment_info(anthy_context_t ac, int nth);
59: void print_context_info(anthy_context_t ac, struct conv_res *cr);
60:
61: #endif