1 /* 2 * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University 3 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 4 * Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology 5 * All rights reserved 6 */ 7 8 #ifndef __NEXT__H__ 9 #define __NEXT__H__ 10 11 #include <sent/stddefs.h> 12 #include <sent/vocabulary.h> 13 #include <sent/dfa.h> 14 #include <sent/speech.h> 15 16 /* ported from julian/dfa_decode.c */ 17 /* $B<!C18l8uJd(B */ 18 typedef struct __nextword__ { 19 WORD_ID id; /* $BC18l(BID */ 20 int next_state; /* $BA+0\8e$N(BDFA$B>uBVHV9f(B */ 21 boolean can_insert_sp; /* $B2>@b$H$3$NC18l$N4V$K(Bsp$B$,F~$k2DG=@-$,$"$k>l9g(B TRUE */ 22 } NEXTWORD; 23 /* $BItJ,J82>@b(B */ 24 typedef struct __node__ { 25 boolean endflag; /* $BC5:w=*N;%U%i%0(B */ 26 WORD_ID seq[MAXSEQNUM]; /* $B2>@b$NC18l7ONs(B */ 27 short seqnum; /* $B2>@b$NC18l$N?t(B */ 28 int state; /* $B8=:_$N(BDFA$B>uBVHV9f(B */ 29 } NODE; 30 31 NEXTWORD **nw_malloc(); 32 void nw_free(NEXTWORD **nw); 33 int dfa_firstwords(NEXTWORD **nw); 34 int dfa_nextwords(NODE *hypo, NEXTWORD **nw); 35 int dfa_firstterms(NEXTWORD **nw); 36 int dfa_nextterms(NODE *hypo, NEXTWORD **nw); 37 boolean dfa_acceptable(NODE *hypo); 38 39 40 #endif /* __NEXT__H__ */ 41