1: #ifndef _main_h_included_
2: #define _main_h_included_
3:
4: #include <anthy/xstr.h>
5: #include <anthy/dic.h>
6: #include <anthy/splitter.h>
7: #include <anthy/segment.h>
8: #include <anthy/ordering.h>
9: #include <anthy/prediction.h>
10:
11:
12:
13:
14: struct prediction_cache {
15:
16: xstr str;
17:
18: int nr_prediction;
19:
20: struct prediction_t* predictions;
21: };
22:
23:
24:
25:
26: struct anthy_context {
27:
28: xstr str;
29:
30: struct segment_list seg_list;
31:
32: dic_session_t dic_session;
33:
34: struct splitter_context split_info;
35:
36: struct ordering_context_wrapper ordering_info;
37:
38: struct prediction_cache prediction;
39:
40: int encoding;
41:
42: int reconversion_mode;
43: };
44:
45:
46:
47: void anthy_init_contexts(void);
48: void anthy_quit_contexts(void);
49: void anthy_init_personality(void);
50: void anthy_quit_personality(void);
51: int anthy_do_set_personality(const char *id);
52: struct anthy_context *anthy_do_create_context(int);
53: int anthy_do_context_set_str(struct anthy_context *c, xstr *x, int is_reverse);
54: void anthy_do_reset_context(struct anthy_context *c);
55: void anthy_do_release_context(struct anthy_context *c);
56:
57: void anthy_do_resize_segment(struct anthy_context *c,int nth,int resize);
58:
59: int anthy_do_set_prediction_str(struct anthy_context *c, xstr *x);
60: void anthy_release_segment_list(struct anthy_context *ac);
61: void anthy_save_history(const char *fn, struct anthy_context *ac);
62:
63:
64: void anthy_do_print_context(struct anthy_context *c, int encoding);
65:
66:
67: #endif
68: