2 * ¼½ñ¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹
4 #ifndef _dic_h_included_
5 #define _dic_h_included_
10 /** ¼½ñ¤ÎÆɤߤËÂФ¹¤ë¥Ï¥ó¥É¥ë(sequence entry) */
11 typedef struct seq_ent *seq_ent_t;
13 typedef struct dic_ent *compound_ent_t;
15 /* Á´ÂΤνé´ü²½¡¢²òÊü */
16 int anthy_init_dic(void);
17 void anthy_quit_dic(void);
19 /* ¾¥×¥í¥»¥¹¤ËÂФ¹¤ëÇÓ¾À©¸æ */
20 void anthy_lock_dic(void);
21 void anthy_unlock_dic(void);
24 void anthy_gang_load_dic(xstr *xs, int is_reverse);
27 seq_ent_t anthy_get_seq_ent_from_xstr(xstr *xs, int is_reverse);
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);
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);
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);
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);
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);
58 typedef struct mem_dic *dic_session_t;
59 /*typedef struct dic_session *dic_session_t;*/
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);
66 void anthy_dic_set_personality(const char *);
73 int anthy_dic_check_word_relation(int from, int to);
77 void anthy_add_unknown_word(xstr *yomi, xstr *word);
78 void anthy_forget_unused_unknown_word(xstr *xs);