Tizen 2.1 base
[platform/core/uifw/anthy.git] / anthy / dic.h
1 /*
2  * ¼­½ñ¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹
3  */
4 #ifndef _dic_h_included_
5 #define _dic_h_included_
6
7 #include "xstr.h"
8 #include "wtype.h"
9
10 /** ¼­½ñ¤ÎÆɤߤËÂФ¹¤ë¥Ï¥ó¥É¥ë(sequence entry) */
11 typedef struct seq_ent *seq_ent_t;
12 /***/
13 typedef struct dic_ent *compound_ent_t;
14
15 /* Á´ÂΤνé´ü²½¡¢²òÊü */
16 int anthy_init_dic(void);
17 void anthy_quit_dic(void);
18
19 /* Â¾¥×¥í¥»¥¹¤ËÂФ¹¤ëÇÓ¾À©¸æ */
20 void anthy_lock_dic(void);
21 void anthy_unlock_dic(void);
22
23 /**/
24 void anthy_gang_load_dic(xstr *xs, int is_reverse);
25
26 /* Ê¸»úÎó¤Î¼èÆÀ */
27 seq_ent_t anthy_get_seq_ent_from_xstr(xstr *xs, int is_reverse);
28 /* Ê¸»úÎó¤Î¾ðÊó */
29 int anthy_get_nr_dic_ents(seq_ent_t se, xstr *xs);
30 int anthy_has_compound_ents(seq_ent_t se);
31 int anthy_has_non_compound_ents(seq_ent_t se);
32 int anthy_get_nth_dic_ent_is_compound(seq_ent_t se, int nth);
33 /* ÈóÊ£¹ç¸ì */
34 /* caller should free @res */
35 int anthy_get_nth_dic_ent_str(seq_ent_t, xstr *orig, int, xstr *res);
36 int anthy_get_nth_dic_ent_freq(seq_ent_t, int nth);
37 int anthy_get_nth_dic_ent_wtype(seq_ent_t, xstr *, int nth, wtype_t *w);
38 /*  ÉÊ»ì */
39 int anthy_get_seq_ent_pos(seq_ent_t, int pos);
40 int anthy_get_seq_ent_ct(seq_ent_t, int pos, int ct);
41 int anthy_get_seq_ent_wtype_freq(seq_ent_t, wtype_t);
42 int anthy_get_seq_ent_indep(seq_ent_t se);
43 /* Ê£¹ç¸ì */
44 compound_ent_t anthy_get_nth_compound_ent(seq_ent_t se, int nth);
45 int anthy_get_seq_ent_wtype_compound_freq(seq_ent_t se, wtype_t wt);
46 /**/
47 int anthy_compound_get_wtype(compound_ent_t, wtype_t *w);
48 int anthy_compound_get_freq(compound_ent_t ce);
49 int anthy_compound_get_nr_segments(compound_ent_t ce);
50 int anthy_compound_get_nth_segment_len(compound_ent_t ce, int nth);
51 int anthy_compound_get_nth_segment_xstr(compound_ent_t ce, int nth, xstr *xs);
52
53
54
55 /** ¼­½ñ¥»¥Ã¥·¥ç¥ó
56  *
57  */
58 typedef struct mem_dic *dic_session_t;
59 /*typedef struct dic_session *dic_session_t;*/
60
61 dic_session_t anthy_dic_create_session(void);
62 void anthy_dic_activate_session(dic_session_t );
63 void anthy_dic_release_session(dic_session_t);
64
65 /* personality */
66 void anthy_dic_set_personality(const char *);
67 /**/
68 #define ANON_ID ""
69
70
71 /** ÍÑÎã¼­½ñ
72  */
73 int anthy_dic_check_word_relation(int from, int to);
74
75 /** Ì¤Ãθì¤Î³Ø½¬
76  */
77 void anthy_add_unknown_word(xstr *yomi, xstr *word);
78 void anthy_forget_unused_unknown_word(xstr *xs);
79
80 #endif