• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*---------------------------------------------------------------------------*
2  *  fsm_dictionary.h  *
3  *                                                                           *
4  *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
5  *                                                                           *
6  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
7  *  you may not use this file except in compliance with the License.         *
8  *                                                                           *
9  *  You may obtain a copy of the License at                                  *
10  *      http://www.apache.org/licenses/LICENSE-2.0                           *
11  *                                                                           *
12  *  Unless required by applicable law or agreed to in writing, software      *
13  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15  *  See the License for the specific language governing permissions and      *
16  *  limitations under the License.                                           *
17  *                                                                           *
18  *---------------------------------------------------------------------------*/
19 
20 
21 #ifndef _FSM_DICTIONARY_H__
22 #define _FSM_DICTIONARY_H__
23 
24 #include "lts_seq_internal.h"
25 
26 #define MAX_FSM_WORD_LEN 30
27 #define MAX_FSM_PRON_LEN 100
28 
29 typedef struct FSM_DICTIONARY {
30   PM *phone_mapping;
31   LM *letter_mapping;
32 #ifdef TI_DSP
33 	unsigned short *fsm_array;
34 #else
35 	unsigned char *fsm_array;
36 #endif
37 
38 	int fsm_size;
39 } FSM_DICTIONARY;
40 
41 
42 /* function declarations */
43 SWIsltsResult load_fsm_dictionary(const char *dict_file, FSM_DICTIONARY ** pd);
44 SWIsltsResult free_fsm_dictionary(FSM_DICTIONARY * d);
45 int get_lts_pron(FSM_DICTIONARY *d, char *word, char **pron, int max_pron_len);
46 
47 #endif /* _FSM_DICTIONARY_H__ */
48 
49