fillpen.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* ====================================================================
3  * Copyright (c) 1999-2004 Carnegie Mellon University. All rights
4  * reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * This work was supported in part by funding from the Defense Advanced
19  * Research Projects Agency and the National Science Foundation of the
20  * United States of America, and the CMU Sphinx Speech Consortium.
21  *
22  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
23  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
26  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * ====================================================================
35  *
36  */
37 /*
38  * fillpen.c -- Filler penalties (penalties for words that do not show up in
39  * the main LM.
40  *
41  * **********************************************
42  * CMU ARPA Speech Project
43  *
44  * Copyright (c) 1996 Carnegie Mellon University.
45  * ALL RIGHTS RESERVED.
46  * **********************************************
47  *
48  * HISTORY
49  * $Log$
50  * Revision 1.1 2006/04/05 20:27:30 dhdfu
51  * A Great Reorganzation of header files and executables
52  *
53  * Revision 1.11 2006/02/23 04:11:13 arthchan2003
54  * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: Added silprob and fillprob. Added fillpen_report.
55  *
56  * Revision 1.10.4.2 2005/06/28 19:09:04 arthchan2003
57  * Add declaration for fillpen_report.
58  *
59  * Revision 1.10.4.1 2005/06/28 06:59:04 arthchan2003
60  * Add silence probability and filler probability as members of fillpen_t, add reporting functions.
61  *
62  * Revision 1.10 2005/06/21 21:09:22 arthchan2003
63  * 1, Fixed doxygen documentation. 2, Added keyword.
64  *
65  * Revision 1.4 2005/06/13 04:02:58 archan
66  * Fixed most doxygen-style documentation under libs3decoder.
67  *
68  * Revision 1.3 2005/03/30 01:22:46 archan
69  * Fixed mistakes in last updates. Add
70  *
71  *
72  * 11-Oct-96 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
73  * Created.
74  */
75 
76 
77 #ifndef _S3_FILLPEN_H_
78 #define _S3_FILLPEN_H_
79 
80 #include <logmath.h>
81 #include <s3types.h>
82 
87 #ifdef __cplusplus
88 extern "C" {
89 #endif
90 #if 0
91 } /* Fool Emacs into not indenting things. */
92 #endif
93 
94 #include "dict.h"
95 
96 
97 typedef struct {
100  int32 *prob;
102  float64 lw;
103  float64 wip;
105  float64 silprob;
106  float64 fillerprob;
108 #if 0
109  float64 pip;
110 #endif
111 } fillpen_t;
112 
113 
127 fillpen_t *fillpen_init (dict_t *dict,
128  const char *file,
129  float64 silprob,
130  float64 fillprob,
132  float64 lw,
133  float64 wip,
134  logmath_t *logmath
135  );
136 
140 int32 fillpen (fillpen_t *f,
141  s3wid_t w
142  );
143 
147 void fillpen_report(fillpen_t *f
148  );
149 
150 /* RAH
151  free memory allocated by fillpen_init
152 */
154 void fillpen_free (fillpen_t *f
155  );
156 
157 #if 0
158 { /* Stop indent from complaining */
159 #endif
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif