include
fsg.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
*
19
* THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
20
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
23
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
*
31
* ====================================================================
32
*
33
*/
34
35
36
#ifndef __S2_FSG_H__
37
#define __S2_FSG_H__
38
39
#include "
s3types.h
"
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
45
/*
46
* Structures through which an application may load an FSG into the decoder.
47
* There's essentially a 1-to-1 correspondence between the FSG file format
48
* and these structures.
49
*/
50
typedef
struct
s2_fsg_trans_s
{
51
int32
from_state
;
52
int32
to_state
;
53
float32
prob
;
/* Probability associated with transition */
54
char
*
word
;
/* NULL for null transitions */
55
struct
s2_fsg_trans_s
*
next
;
/* For linking together all transitions in FSG */
56
}
s2_fsg_trans_t
;
57
58
typedef
struct
s2_fsg_s
{
59
char
*
name
;
/* This would be the name on the FSG_BEGIN line
60
in an FSG file. Can be NULL or "" for unnamed
61
FSGs */
62
int32
n_state
;
/* Set of states = 0 .. n_state-1 */
63
int32
start_state
;
/* 0 <= start_state < n_state */
64
int32
final_state
;
/* 0 <= final_state < n_state */
65
s2_fsg_trans_t
*
trans_list
;
/* Null-terminated list of transitions in FSG,
66
in no particular order */
67
}
s2_fsg_t
;
68
69
#ifdef __cplusplus
70
}
71
#endif
72
#endif
s2_fsg_s::n_state
int32 n_state
Definition:
fsg.h:62
s2_fsg_t
struct s2_fsg_s s2_fsg_t
s2_fsg_trans_s::word
char * word
Definition:
fsg.h:54
s2_fsg_s::start_state
int32 start_state
Definition:
fsg.h:63
s2_fsg_trans_t
struct s2_fsg_trans_s s2_fsg_trans_t
s2_fsg_s::final_state
int32 final_state
Definition:
fsg.h:64
s2_fsg_trans_s::from_state
int32 from_state
Definition:
fsg.h:51
s2_fsg_trans_s::prob
float32 prob
Definition:
fsg.h:53
s2_fsg_s::trans_list
s2_fsg_trans_t * trans_list
Definition:
fsg.h:65
s2_fsg_s
Definition:
fsg.h:58
s2_fsg_trans_s::next
struct s2_fsg_trans_s * next
Definition:
fsg.h:55
s3types.h
Size definition of semantically units. Common for both s3 and s3.X decoder.
s2_fsg_trans_s::to_state
int32 to_state
Definition:
fsg.h:52
s2_fsg_s::name
char * name
Definition:
fsg.h:59
s2_fsg_trans_s
Definition:
fsg.h:50
Generated by
1.8.14