2 * ÉÊ»ì¤Î·¿ wtype_t ¤ò°·¤¦
5 * ñ¸ì¤Ï¼¡¤ÎÍ×ÁǤò»ý¤Ä¡£
11 * *¼«Î©¸ì¤«¤É¤¦¤«¤Î¥Õ¥é¥°
12 * wtype_t¤Ï¾åµ¤Î¾ðÊó¤ò¤¹¤Ù¤Æ´Þ¤à¡£
14 * ³ÆÍ×ÁǤξܺ٤ˤĤ¤¤Æ¤Ï doc/POS¤ò»²¾È¤¹¤Ù¤·
16 #ifndef _wtype_h_included_
17 #define _wtype_h_included_
19 /*ÉÊ»ì Part Of Speech */
33 #define POS_TANKANJI 13
41 /* ³èÍÑ·Á Conjugate Type */
52 /* ³èÍÑ¥¯¥é¥¹ Conjugate Class */
76 /* ÉûÉÊ»ì Class Of Speech */
86 /* °ìÈÌÀÜƬ¼¡¦ÀÜÈø¼ */
89 #define COS_SVSUFFIX 6
92 /* Éû¡¹ÉÊ»ì Sub Class Of Speech*/
94 #define SCOS_FAMNAME 1
95 #define SCOS_FSTNAME 2
149 #define SCOS_N1000 93
150 #define SCOS_N10000 94
154 /* ¤³¤ÎÆ°»ì¤ÏÏ¢Âλ줬̾»ì²½¤¹¤ë */
158 /* ¼«Î©¸ì¡¢Ê¸Àá¤Î¥³¥¢¤È¤Ê¤ë */
163 /* wtype_tÃæ¤Î¥ª¥Õ¥»¥Ã¥È */
171 /* ³Æbit field¤ÎÉý */
182 unsigned int pos : POS_BITS;
183 unsigned int cos : COS_BITS;
184 unsigned int scos : SCOS_BITS;
185 unsigned int cc : CC_BITS;
186 unsigned int ct : CT_BITS;
187 unsigned int wf : WF_BITS;
190 typedef struct wtype wtype_t;
192 /** anthy_wtype_include(̾»ì¡¢¿Í̾)¤Ï¿¿¡¢µÕ¤Ïµ¶ */
193 int anthy_wtype_include(wtype_t haystack, wtype_t needle);
195 /* Æó¤Ä¤ÎÉʻ줬´°Á´¤Ë°ìÃפ¹¤ë¤«¤É¤¦¤«¤ò¸«¤ë */
196 int anthy_wtype_equal(wtype_t lhs, wtype_t rhs);
198 void anthy_print_wtype(wtype_t w);
199 /* ¼½ñ¥Õ¥¡¥¤¥ëÃæ¤Î̾Á°¤«¤éÉÊ»ì¤òÆÀ¤ë(´Ø¿ô̾¤¬°¤¤) */
200 const char *anthy_type_to_wtype(const char *name, wtype_t *w);
201 /* ÉÊ»ì¤Î̾Á°¤«¤éÉÊ»ì¤òÆÀ¤ë */
202 wtype_t anthy_init_wtype_by_name(const char *str);
204 int anthy_wtype_get_pos(wtype_t w);
205 int anthy_wtype_get_cc(wtype_t w);
206 int anthy_wtype_get_ct(wtype_t w);
207 int anthy_wtype_get_cos(wtype_t w);
208 int anthy_wtype_get_scos(wtype_t w);
209 int anthy_wtype_get_wf(wtype_t w);
212 int anthy_wtype_get_indep(wtype_t w);
213 int anthy_wtype_get_sv(wtype_t w);
214 int anthy_wtype_get_meisi(wtype_t w);
215 int anthy_wtype_get_ajv(wtype_t w);
217 wtype_t anthy_get_wtype(int pos, int cos, int scos, int cc, int ct, int wf);
218 wtype_t anthy_get_wtype_with_ct(wtype_t base, int ct);
220 void anthy_wtype_set_pos(wtype_t *w, int pos);
221 void anthy_wtype_set_cc(wtype_t *w, int cc);
222 void anthy_wtype_set_ct(wtype_t *w, int ct);
223 void anthy_wtype_set_cos(wtype_t *w, int cs);
224 void anthy_wtype_set_scos(wtype_t *w, int scos);
225 void anthy_wtype_set_dep(wtype_t *w, int isDep);
227 void anthy_init_wtypes(void);
229 extern wtype_t anthy_wt_all;/* ¤¹¤Ù¤Æ¤Ë¥Þ¥Ã¥Á¤¹¤ë¼«Î©¸ì */
230 extern wtype_t anthy_wt_none;/* ÉÊ»ì̵¤·POS_INVAL */