1 /*
2  * $Id: dartsdic.h,v 1.1.1.1 2007/03/13 07:40:10 masayu-a Exp $
3  */
4 
5 #ifndef _DARTSDIC_H_
6 #define _DARTSDIC_H_
7 
8 typedef struct _darts_t darts_t;
9 typedef struct _da_build_t da_build_t;
10 
11 extern darts_t *Da_dicfile[];
12 extern int Da_ndicfile;
13 
14 typedef struct {
15     unsigned short posid;
16     unsigned char inf_type;
17     unsigned char inf_form;
18     unsigned short weight;
19     short con_tbl;
20     long dat_index;
21 } da_lex_t;
22 
23 typedef struct {
24     short stem_len;
25     short reading_len;
26     short pron_len;
27     short base_len;
28     short info_len;
29     long compound;
30 } da_dat_t;
31 
32 darts_t *da_open(char*, char*, char*);
33 int da_lookup(darts_t*, char*, int, long*, int);
34 long da_exact_lookup(darts_t*, char*, int);
35 int da_get_lex(darts_t*, long, da_lex_t*, int*);
36 void *da_get_lex_base(darts_t*);
37 void *da_get_dat_base(darts_t*);
38 
39 da_build_t *da_build_new(char*);
40 void da_build_add(da_build_t*, char*, long);
41 int da_build_dump(da_build_t*,char*,FILE*);
42 
43 #endif /* _DARTSDIC_H_ */
44