word_ugprob.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* ====================================================================
3  * Copyright (c) 1995-2002 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 /*
39  * word_ugprob.h -- Unigram word probability structure
40  *
41  * $Log$
42  * Revision 1.1 2006/04/05 20:27:30 dhdfu
43  * A Great Reorganzation of header files and executables
44  *
45  * Revision 1.2 2006/02/23 05:12:23 arthchan2003
46  * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: split word_ugprob's routine from flat_fwd
47  *
48  * Revision 1.1.2.1 2005/09/18 01:17:07 arthchan2003
49  * Add word_ugprob_t that is separated from flat_fwd.c
50  *
51  */
52 
53 #include "s3types.h"
54 #include "mdef.h"
55 #include "lm.h"
56 #include "dict.h"
57 
58 #ifndef WORD_UGPROB
59 #define WORD_UGPROB
60 
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 #if 0
66 /* Fool Emacs. */
67 }
68 #endif
69 
77 typedef struct word_ugprob_s {
79  int32 ugprob;
80  struct word_ugprob_s *next;
82 
87  lm_t *_lm,
88  dict_t *_dict
89  );
90 
91 void word_ugprob_free(word_ugprob_t ** wugp, int32 n);
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 
98 #endif /*WORD_UGPROB*/
strcture for storing the model definition.
Definition: mdef.h:184
s3wid_t wid
Definition: word_ugprob.h:78
int32 s3wid_t
Definition: s3types.h:136
word_ugprob_t ** init_word_ugprob(mdef_t *_mdef, lm_t *_lm, dict_t *_dict)
Operations on dictionary.
struct word_ugprob_s word_ugprob_t
struct word_ugprob_s * next
Definition: word_ugprob.h:80
int32 ugprob
Definition: word_ugprob.h:79
Size definition of semantically units. Common for both s3 and s3.X decoder.
a structure for a dictionary.
Definition: dict.h:146
Definition: word_ugprob.h:77
void word_ugprob_free(word_ugprob_t **wugp, int32 n)
Model definition.
The language model. All unigrams are read into memory on initialization. Bigrams and trigrams read in...
Language model.