(linenum→info "unix/slp.c:2238")

anthy/9100e/src-worddic/dic_ent.h

    1: #ifndef _dic_ent_h_included_
    2: #define _dic_ent_h_included_
    3: 
    4: #include <anthy/wtype.h>
    5: #include <anthy/dic.h>
    6: 
    7: /* 文字列のタイプ (seq_ent->seq_type) */
    8: #define ST_NONE 0
    9: /**/
   10: #define ST_REVERSE 8
   11: 
   12: /** ある単語 */
   13: struct dic_ent {
   14:   wtype_t type; /** 品詞 */
   15:   int freq; /** 頻度 */
   16:   int feature;
   17:   const char *wt_name;
   18:   int is_compound;
   19:   xstr str; /** 変換結果の文字列 */
   20:   /** 同一品詞の場合の辞書中の順番(anthy_get_seq_ent_wtype_freqから
   21:       anthy_wtype_includeが呼ばれる回数を減らすのに用いる */
   22:   int order;
   23: };
   24: 
   25: /**ある文字列と同音異義語の配列
   26:  * seq_ent_t として参照される
   27:  */
   28: struct seq_ent {
   29:   xstr str;/* 読み */
   30: 
   31:   int seq_type; /** ST_(type) */
   32: 
   33:   /** dic_entの配列 */
   34:   int nr_dic_ents;
   35:   struct dic_ent **dic_ents;
   36:   /** compound_entの配列 */
   37:   int nr_compound_ents;
   38: 
   39:   /* 属するメモリ辞書 */
   40:   struct mem_dic *md;
   41:   /* メモリ辞書中のhash chain */
   42:   struct seq_ent *next;
   43: };
   44: 
   45: /* ext_ent.c */
   46: void anthy_init_ext_ent(void);
   47: /**/
   48: int anthy_get_nr_dic_ents_of_ext_ent(struct seq_ent *se,xstr *xs);
   49: int anthy_get_nth_dic_ent_str_of_ext_ent(seq_ent_t ,xstr *,int ,xstr *);
   50: int anthy_get_nth_dic_ent_wtype_of_ext_ent(xstr *,int ,wtype_t *);
   51: int anthy_get_nth_dic_ent_freq_of_ext_ent(struct seq_ent *se, int nth);
   52: int anthy_get_ext_seq_ent_wtype(struct seq_ent *, wtype_t );
   53: seq_ent_t anthy_get_ext_seq_ent_from_xstr(xstr *x, int is_reverse);
   54: int anthy_get_ext_seq_ent_pos(struct seq_ent *, int);
   55: int anthy_get_ext_seq_ent_indep(struct seq_ent *);
   56: int anthy_get_ext_seq_ent_ct(struct seq_ent *, int, int);
   57: int anthy_get_ext_seq_ent_wtype(struct seq_ent *se, wtype_t w);
   58: 
   59: #endif
Syntax (Markdown)