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

anthy/9100e/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
Syntax (Markdown)