src/libpocketsphinx/fillpen.h

Go to the documentation of this file.
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 
00082 #include "s3types.h"
00083 #include "s3dict.h"
00084 
00085 
00090 #ifdef __cplusplus
00091 extern "C" {
00092 #endif
00093 #if 0
00094 } /* Fool Emacs into not indenting things. */
00095 #endif
00096 
00097 
00098 typedef struct {
00099     s3dict_t *dict;     
00101     int32 *prob;        
00103     float64 lw;         
00104     float64 wip;        
00106     float64 silprob;      
00107     float64 fillerprob;      
00108 } fillpen_t;
00109 
00110 
00123 fillpen_t *fillpen_init (s3dict_t *dict,        
00124                          const char *file,      
00125                          float64 silprob,       
00126                          float64 fillprob,      
00128                          float64 lw,            
00129                          float64 wip,           
00130                          logmath_t *logmath
00131     );
00132 
00136 int32 fillpen(fillpen_t *f,     
00137               s3wid_t w         
00138     );
00139 
00143 void fillpen_report(fillpen_t *f        
00144     );
00145 
00146 /* RAH 
00147    free memory allocated by fillpen_init
00148 */
00149 void fillpen_free (fillpen_t *f 
00150     );
00151 
00152 #if 0
00153 { /* Stop indent from complaining */
00154 #endif
00155 #ifdef __cplusplus
00156 }
00157 #endif
00158 
00159 #endif

Generated on Mon Jan 24 21:50:15 2011 for PocketSphinx by  doxygen 1.4.7