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 * fillpen.c -- Filler penalties (penalties for words that do not show up in 00039 * the main LM. 00040 * 00041 * ********************************************** 00042 * CMU ARPA Speech Project 00043 * 00044 * Copyright (c) 1996 Carnegie Mellon University. 00045 * ALL RIGHTS RESERVED. 00046 * ********************************************** 00047 * 00048 * HISTORY 00049 * $Log$ 00050 * Revision 1.1 2006/04/05 20:27:30 dhdfu 00051 * A Great Reorganzation of header files and executables 00052 * 00053 * Revision 1.11 2006/02/23 04:11:13 arthchan2003 00054 * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: Added silprob and fillprob. Added fillpen_report. 00055 * 00056 * Revision 1.10.4.2 2005/06/28 19:09:04 arthchan2003 00057 * Add declaration for fillpen_report. 00058 * 00059 * Revision 1.10.4.1 2005/06/28 06:59:04 arthchan2003 00060 * Add silence probability and filler probability as members of fillpen_t, add reporting functions. 00061 * 00062 * Revision 1.10 2005/06/21 21:09:22 arthchan2003 00063 * 1, Fixed doxygen documentation. 2, Added keyword. 00064 * 00065 * Revision 1.4 2005/06/13 04:02:58 archan 00066 * Fixed most doxygen-style documentation under libs3decoder. 00067 * 00068 * Revision 1.3 2005/03/30 01:22:46 archan 00069 * Fixed mistakes in last updates. Add 00070 * 00071 * 00072 * 11-Oct-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University 00073 * Created. 00074 */ 00075 00076 00077 #ifndef _S3_FILLPEN_H_ 00078 #define _S3_FILLPEN_H_ 00079 00080 #include <logmath.h> 00081 #include <s3types.h> 00082 00087 #ifdef __cplusplus 00088 extern "C" { 00089 #endif 00090 #if 0 00091 } /* Fool Emacs into not indenting things. */ 00092 #endif 00093 00094 #include "dict.h" 00095 00096 00097 typedef struct { 00098 dict_t *dict; 00100 int32 *prob; 00102 float64 lw; 00103 float64 wip; 00105 float64 silprob; 00106 float64 fillerprob; 00108 #if 0 00109 float64 pip; 00110 #endif 00111 } fillpen_t; 00112 00113 00126 S3DECODER_EXPORT 00127 fillpen_t *fillpen_init (dict_t *dict, 00128 const char *file, 00129 float64 silprob, 00130 float64 fillprob, 00132 float64 lw, 00133 float64 wip, 00134 logmath_t *logmath 00135 ); 00136 00140 int32 fillpen (fillpen_t *f, 00141 s3wid_t w 00142 ); 00143 00147 void fillpen_report(fillpen_t *f 00148 ); 00149 00150 /* RAH 00151 free memory allocated by fillpen_init 00152 */ 00153 S3DECODER_EXPORT 00154 void fillpen_free (fillpen_t *f 00155 ); 00156 00157 #if 0 00158 { /* Stop indent from complaining */ 00159 #endif 00160 #ifdef __cplusplus 00161 } 00162 #endif 00163 00164 #endif