00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 00002 /* ==================================================================== 00003 * Copyright (c) 1999-2004 Carnegie Mellon University. All rights 00004 * reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in 00015 * the documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * This work was supported in part by funding from the Defense Advanced 00019 * Research Projects Agency and the National Science Foundation of the 00020 * United States of America, and the CMU Sphinx Speech Consortium. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 00023 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00024 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00025 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 00026 * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * ==================================================================== 00035 * 00036 */ 00037 /* 00038 * tmat.h 00039 * 00040 * ********************************************** 00041 * CMU ARPA Speech Project 00042 * 00043 * Copyright (c) 1997 Carnegie Mellon University. 00044 * ALL RIGHTS RESERVED. 00045 * ********************************************** 00046 * 00047 * HISTORY 00048 * $Log$ 00049 * Revision 1.1 2006/04/05 20:27:30 dhdfu 00050 * A Great Reorganzation of header files and executables 00051 * 00052 * Revision 1.10 2006/02/22 17:46:26 arthchan2003 00053 * Merged from SPHINX3_5_2_RCI_IRII_BRANCH: 00054 * 1, Used new log function in logs3 00055 * 2, Fixed dox-doc. 00056 * 00057 * Revision 1.9.4.1 2005/07/05 05:47:59 arthchan2003 00058 * Fixed dox-doc. struct level of documentation are included. 00059 * 00060 * Revision 1.9 2005/06/21 19:23:35 arthchan2003 00061 * 1, Fixed doxygen documentation. 2, Added $ keyword. 00062 * 00063 * Revision 1.6 2005/06/13 04:02:56 archan 00064 * Fixed most doxygen-style documentation under libs3decoder. 00065 * 00066 * Revision 1.5 2005/05/03 04:09:09 archan 00067 * Implemented the heart of word copy search. For every ci-phone, every word end, a tree will be allocated to preserve its pathscore. This is different from 3.5 or below, only the best score for a particular ci-phone, regardless of the word-ends will be preserved at every frame. The graph propagation will not collect unused word tree at this point. srch_WST_propagate_wd_lv2 is also as the most stupid in the century. But well, after all, everything needs a start. I will then really get the results from the search and see how it looks. 00068 * 00069 * Revision 1.4 2005/04/21 23:50:26 archan 00070 * Some more refactoring on the how reporting of structures inside kbcore_t is done, it is now 50% nice. Also added class-based LM test case into test-decode.sh.in. At this moment, everything in search mode 5 is already done. It is time to test the idea whether the search can really be used. 00071 * 00072 * Revision 1.3 2005/03/30 01:22:47 archan 00073 * Fixed mistakes in last updates. Add 00074 * 00075 * 00076 * 20.Apr.2001 RAH (rhoughton@mediasite.com, ricky.houghton@cs.cmu.edu) 00077 * Added tmat_free to free allocated memory 00078 * 00079 * 29-Feb-2000 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00080 * Added tmat_chk_1skip(), and made tmat_chk_uppertri() public. 00081 * 00082 * 10-Dec-1999 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00083 * Added tmat_dump(). 00084 * 00085 * 11-Mar-97 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University. 00086 * Started based on original S3 implementation. 00087 */ 00088 00089 00090 #ifndef _S3_TMAT_H_ 00091 #define _S3_TMAT_H_ 00092 00093 #include <stdio.h> 00094 00095 #include <s3types.h> 00096 #include <logmath.h> 00097 00101 #ifdef __cplusplus 00102 extern "C" { 00103 #endif 00104 #if 0 00105 } /* Fool Emacs into not indenting things. */ 00106 #endif 00107 00113 typedef struct { 00114 logmath_t *logmath; 00115 int32 ***tp; 00117 int32 n_tmat; 00118 int32 n_state; 00120 } tmat_t; 00121 00122 00125 tmat_t *tmat_init (const char *tmatfile, 00126 float64 tpfloor, 00127 int32 breport, 00128 logmath_t *logmath 00129 ); 00130 00131 00132 00135 void tmat_dump (tmat_t *tmat, 00136 FILE *fp 00137 ); 00138 00139 00144 int32 tmat_chk_uppertri (tmat_t *tmat 00145 ); 00146 00147 00154 int32 tmat_chk_1skip (tmat_t *tmat 00155 ); 00156 00161 void tmat_free (tmat_t *t 00162 ); 00163 00167 void tmat_report(tmat_t *t 00168 ); 00169 00170 #if 0 00171 { /* Stop indent from complaining */ 00172 #endif 00173 #ifdef __cplusplus 00174 } 00175 #endif 00176 00177 #endif