/*
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
* This file is part of FreeWnn.
*
* Copyright Kyoto University Research Institute for Mathematical Sciences
* 1987, 1988, 1989, 1990, 1991, 1992
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
* Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
* Copyright FreeWnn Project 1999, 2000
*
* Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define WNN_YOMI_SIZE 10
typedef struct wnn_jl_bun WNN_BUN;
struct wnn_jl_bun
{
int jirilen; /* 候補文節の自立語 */
int dic_no;
int entry;
int kangovect; /* 接続ベクトルテーブルへのポインタ */
int hinsi; /* 品詞 */
int hindo:16; /* 頻度(仮想値) */
int ref_cnt:4; /* 文節リストに使われている */
/* BUG FIX signed --> unsigned */
unsigned int ima:1; /* 今使ったよビット */
unsigned int hindo_updated:1; /* この文節の頻度は更新されている */
unsigned int nobi_top:1; /* 伸ばし縮みを行ったかを示す。 */
/* egg みたいに伸ばし縮みを繰り返し行う時に、途中に現れる候補の今
使ったよ ビットを 落としてはならない。 */
unsigned int dai_top:1; /* 大文節の先頭 */
unsigned int dai_end:1; /* 大文節のsaigo *//* 次候補 nomi */
unsigned int from_zenkouho:2; /*次候補から選択された文節かどうか */
unsigned int bug:1; /* BUG FIX とりあえず */
/* BUG FIX signed --> unsigned */
int hyoka;
int daihyoka;
short yomilen;
short kanjilen;
WNN_BUN *down; /* 今使ったよビットを落とす対象の文節 */
w_char yomi[WNN_YOMI_SIZE]; /* 読み、漢字が入る。入り切らない時には
次につなげる */
WNN_BUN *next; /* 次のストラクトへのポインタ */
WNN_BUN *free_next; /* 次のストラクトへのポインタ */
};
struct wnn_buf
{
struct wnn_env *env; /* 環境 */
int bun_suu; /* 文節数 */
int zenkouho_suu; /* 全候補の数 */
WNN_BUN **bun; /* 文節へのポインタ */
WNN_BUN **down_bnst; /* 今使ったよビットを落とす対象の文節 */
WNN_BUN **zenkouho; /* 全候補へのポインタ */
int *zenkouho_dai; /* daibunsetsu zenkouho */
int zenkouho_dai_suu; /* daibunsetsu zenkouho suu */
short c_zenkouho; /* 全候補中、注目している候補 */
short zenkouho_daip;
int zenkouho_bun; /* 全候補を取っている文節 */
int zenkouho_end_bun; /* 全候補(dai)を取っている最後の文節 */
int zenkouho_endvect; /* 全候補を取った endvect *//* ADD KURI */
WNN_BUN *free_heap;
char *heap; /* linked list of alloced area */
int msize_bun;
int msize_zenkouho;
};