comparison Wnn/include/hinsi_file.h @ 0:bbc77ca4def5

initial import
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 13 Dec 2007 04:30:14 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bbc77ca4def5
1 /*
2 * $Id: hinsi_file.h,v 1.5 2005/04/10 15:26:37 aonoto Exp $
3 */
4
5 /*
6 * FreeWnn is a network-extensible Kana-to-Kanji conversion system.
7 * This file is part of FreeWnn.
8 *
9 * Copyright Kyoto University Research Institute for Mathematical Sciences
10 * 1987, 1988, 1989, 1990, 1991, 1992
11 * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
12 * Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
13 * Copyright FreeWnn Project 1999, 2000
14 *
15 * Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the
29 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
30 * Boston, MA 02111-1307, USA.
31 */
32
33 #ifndef WNN_HINSI_FILE_H
34 #define WNN_HINSI_FILE_H
35
36 /*
37 * 品詞ファイルに関する、定義
38 */
39
40 #define MAXHINSI 256
41 #define MAXFUKUGOU 256
42 #define MAXNODE 256
43 #define FUKUGOU_START 0xffff - RESERVE_FUKUGOU_USIRO
44 #define HEAP_LEN (10 * (MAXHINSI + MAXFUKUGOU))
45 /* 10 bytes for each hinsi */
46 #define WHEAP_LEN (10 * MAXFUKUGOU * sizeof(short))
47 /* 10 bytes for each fukugou hinsi */
48
49
50 #define RESERVE_FUKUGOU_USIRO 512 /* fukugou hinsi no usiro ni
51 koredake reserve wo site oku */
52 /* hitoru ha delete sareta to iu jouhou no
53 ta me*/
54 #define TERMINATE 0xffff
55 #define HINSI_ERR -2
56
57 #define WNN_NODE_SUFFIX '/'
58 #define NODE_CHAR '|'
59 #define COMMENT_CHAR ';'
60 #define DEVIDE_CHAR '$'
61 #define HINSI_SEPARATE_CHAR ':'
62 #define IGNORE_CHAR1 ' '
63 #define IGNORE_CHAR2 '\t'
64 #define YOYAKU_CHAR '@'
65 #define CONTINUE_CHAR '\\'
66
67 struct wnn_fukugou
68 {
69 w_char *name; /* 複合品詞の名前 */
70 /* fukugou hinsi is held as a string */
71 unsigned short *component; /* 複合品詞の構成要素となる品詞の番号の配列
72 (最後は 0xffff で終る)
73 */
74 };
75
76 struct wnn_hinsi_node
77 {
78 w_char *name; /* 品詞ノードの名前 */
79 int kosuu; /* 子どもの数 */
80 w_char *son; /* 最初の子どもへのポインタ */
81 };
82
83 #endif /* WNN_HINSI_FILE_H */