1 /* segment(ʸÀá) ¤ÎÄêµÁ */
2 #ifndef _segment_h_included_
3 #define _segment_h_included_
5 #include <anthy/segclass.h>
6 #include <anthy/wtype.h>
7 #include <anthy/xstr.h>
12 int nth; /* -1¤Î¤È¤¤Ï¼½ñ¤«¤é¤Î³ä¤êÅö¤Æ¤ò¤ä¤Ã¤Æ¤¤¤Ê¤¤ */
15 int ratio;/* ÉÑÅÙ¤òɾ²Á¤¹¤ëºÝ¤Ë»ÈÍѤ¹¤ëÈæΨ */
16 xstr str;/* ÊÑ´¹ÂоݤÎʸ»úÎó */
17 int id;/* ÊÑ´¹·ë²Ì¤Îʸ»úÎó¤ËÂФ¹¤ëhashÃÍ */
20 /** °ì¤Ä¤Î¸õÊä¤ËÁêÅö¤¹¤ë¡£
21 * anthy_release_cand_ent()¤Ç²òÊü¤¹¤ë
30 /** ¸õÊä¤ò¹½À®¤¹¤ëÍ×ÁǤÎÇÛÎó */
32 /** ¼«Î©¸ìÉô¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹ */
36 /** ¸õÊä¤Î¥Õ¥é¥° CEF_? */
41 /* ¸õÊä(cand_ent)¤Î¥Õ¥é¥° */
43 #define CEF_OCHAIRE 0x00000001
44 #define CEF_SINGLEWORD 0x00000002
45 #define CEF_HIRAGANA 0x00000004
46 #define CEF_KATAKANA 0x00000008
47 #define CEF_GUESS 0x00000010
48 #define CEF_USEDICT 0x00000020
49 #define CEF_COMPOUND 0x00000040
50 #define CEF_COMPOUND_PART 0x00000080
51 #define CEF_BEST 0x00000100
52 #define CEF_CONTEXT 0x00000200
54 /** ContextÆâ¤Ë¸ºß¤¹¤ëʸÀá¤ÎÎó
55 * release_seg_ent¤Ç²òÊü¤¹¤ë
58 /* str¤Î¼ÂÂΤÏcontextÃæ¤Ë¤¢¤ë */
60 /* commit¤µ¤ì¤¿¸õÊä¤ÎÈֹ桢Éé¤Î¿ô¤Î¾ì¹ç¤Ï¤Þ¤À¥³¥ß¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ */
64 int nr_cands;/* ¸õÊä¤Î¿ô */
65 struct cand_ent **cands;/* ÇÛÎó */
67 int from, len;/* len == str.len */
71 struct meta_word **mw_array;
73 /* °ìÈÖÀ®ÀÓ¤ÎÎɤ«¤Ã¤¿¥¯¥é¥¹ */
74 enum seg_class best_seg_class;
75 /* °ìÈÖÀ®ÀÓ¤ÎÎɤ«¤Ã¤¿meta_word
76 * mw_arrayÃæ¤Ë¤â¡¢´Þ¤Þ¤ì¤ë¤³¤È¤¬´üÂԤǤ¤ë¤¬¡¢ÊݾڤϤ·¤Ê¤¤ */
77 struct meta_word *best_mw;
79 struct seg_ent *prev, *next;
85 struct seg_ent list_head;
88 /* ¸õÊä¤ò²òÊü¤¹¤ë(̵Â̤ËÀ¸À®¤·¤Æ¤·¤Þ¤Ã¤¿¤â¤ÎÅù) */
89 void anthy_release_cand_ent(struct cand_ent *s);
92 struct seg_ent *anthy_get_nth_segment(struct segment_list *c, int );
93 void anthy_print_candidate(struct cand_ent *ce);
97 struct splitter_context;
98 void anthy_do_make_candidates(struct splitter_context *sc,
99 struct seg_ent *e, int is_reverse);