us_phoneset.c 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. /*************************************************************************/
  2. /* */
  3. /* Carnegie Mellon University and */
  4. /* Centre for Speech Technology Research */
  5. /* University of Edinburgh, UK */
  6. /* Copyright (c) 1998-2001 */
  7. /* All Rights Reserved. */
  8. /* */
  9. /* Permission is hereby granted, free of charge, to use and distribute */
  10. /* this software and its documentation without restriction, including */
  11. /* without limitation the rights to use, copy, modify, merge, publish, */
  12. /* distribute, sublicense, and/or sell copies of this work, and to */
  13. /* permit persons to whom this work is furnished to do so, subject to */
  14. /* the following conditions: */
  15. /* 1. The code must retain the above copyright notice, this list of */
  16. /* conditions and the following disclaimer. */
  17. /* 2. Any modifications must be clearly marked as such. */
  18. /* 3. Original authors' names are not deleted. */
  19. /* 4. The authors' names are not used to endorse or promote products */
  20. /* derived from this software without specific prior written */
  21. /* permission. */
  22. /* */
  23. /* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
  24. /* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
  25. /* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
  26. /* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
  27. /* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
  28. /* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
  29. /* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
  30. /* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
  31. /* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
  32. /* */
  33. /*******************************************************/
  34. /** Autogenerated phoneset trees for us */
  35. /*******************************************************/
  36. #include "cst_string.h"
  37. #include "cst_phoneset.h"
  38. extern const cst_phoneset us_phoneset;
  39. static const char * const us_featnames[] = {
  40. "vc",
  41. "vlng",
  42. "vheight",
  43. "vfront",
  44. "vrnd",
  45. "ctype",
  46. "cplace",
  47. "cvox",
  48. NULL };
  49. static const char * const us_phonenames[] = {
  50. "aa",
  51. "ae",
  52. "ah",
  53. "ao",
  54. "aw",
  55. "ax",
  56. "axr",
  57. "ay",
  58. "b",
  59. "ch",
  60. "d",
  61. "dh",
  62. "dx",
  63. "eh",
  64. "el",
  65. "em",
  66. "en",
  67. "er",
  68. "ey",
  69. "f",
  70. "g",
  71. "hh",
  72. "hv",
  73. "ih",
  74. "iy",
  75. "jh",
  76. "k",
  77. "l",
  78. "m",
  79. "n",
  80. "nx",
  81. "ng",
  82. "ow",
  83. "oy",
  84. "p",
  85. "r",
  86. "s",
  87. "sh",
  88. "t",
  89. "th",
  90. "uh",
  91. "uw",
  92. "v",
  93. "w",
  94. "y",
  95. "z",
  96. "zh",
  97. "pau",
  98. "h#",
  99. "brth",
  100. NULL };
  101. static const int us_fv_000[] = { 0, 1, 2, 2, 3, 4, 4, 4, -1 };
  102. static const int us_fv_001[] = { 0, 5, 2, 6, 3, 4, 4, 4, -1 };
  103. static const int us_fv_002[] = { 0, 5, 7, 7, 3, 4, 4, 4, -1 };
  104. static const int us_fv_003[] = { 0, 1, 2, 2, 0, 4, 4, 4, -1 };
  105. static const int us_fv_004[] = { 0, 8, 2, 7, 3, 4, 4, 4, -1 };
  106. static const int us_fv_005[] = { 0, 9, 7, 7, 3, 4, 4, 4, -1 };
  107. static const int us_fv_006[] = { 0, 9, 7, 7, 3, 10, 9, 0, -1 };
  108. static const int us_fv_007[] = { 0, 8, 2, 7, 3, 4, 4, 4, -1 };
  109. static const int us_fv_008[] = { 3, 4, 4, 4, 4, 5, 1, 0, -1 };
  110. static const int us_fv_009[] = { 3, 4, 4, 4, 4, 9, 11, 3, -1 };
  111. static const int us_fv_010[] = { 3, 4, 4, 4, 4, 5, 9, 0, -1 };
  112. static const int us_fv_011[] = { 3, 4, 4, 4, 4, 12, 8, 0, -1 };
  113. static const int us_fv_012[] = { 3, 9, 4, 4, 4, 5, 9, 0, -1 };
  114. static const int us_fv_013[] = { 0, 5, 7, 6, 3, 4, 4, 4, -1 };
  115. static const int us_fv_014[] = { 0, 5, 4, 4, 4, 1, 9, 0, -1 };
  116. static const int us_fv_015[] = { 0, 5, 4, 4, 4, 13, 1, 0, -1 };
  117. static const int us_fv_016[] = { 0, 5, 4, 4, 4, 13, 9, 0, -1 };
  118. static const int us_fv_017[] = { 0, 9, 7, 7, 3, 10, 4, 4, -1 };
  119. static const int us_fv_018[] = { 0, 8, 7, 6, 3, 4, 4, 4, -1 };
  120. static const int us_fv_019[] = { 3, 4, 4, 4, 4, 12, 14, 3, -1 };
  121. static const int us_fv_020[] = { 3, 4, 4, 4, 4, 5, 15, 0, -1 };
  122. static const int us_fv_021[] = { 3, 4, 4, 4, 4, 12, 16, 3, -1 };
  123. static const int us_fv_022[] = { 3, 4, 4, 4, 4, 12, 16, 0, -1 };
  124. static const int us_fv_023[] = { 0, 5, 6, 6, 3, 4, 4, 4, -1 };
  125. static const int us_fv_024[] = { 0, 1, 6, 6, 3, 4, 4, 4, -1 };
  126. static const int us_fv_025[] = { 3, 4, 4, 4, 4, 9, 11, 0, -1 };
  127. static const int us_fv_026[] = { 3, 4, 4, 4, 4, 5, 15, 3, -1 };
  128. static const int us_fv_027[] = { 3, 4, 4, 4, 4, 1, 9, 0, -1 };
  129. static const int us_fv_028[] = { 3, 4, 4, 4, 4, 13, 1, 0, -1 };
  130. static const int us_fv_029[] = { 3, 4, 4, 4, 4, 13, 9, 0, -1 };
  131. static const int us_fv_030[] = { 3, 4, 4, 4, 4, 13, 8, 0, -1 };
  132. static const int us_fv_031[] = { 3, 4, 4, 4, 4, 13, 15, 0, -1 };
  133. static const int us_fv_032[] = { 0, 8, 7, 2, 0, 4, 4, 4, -1 };
  134. static const int us_fv_033[] = { 0, 8, 7, 2, 0, 4, 4, 4, -1 };
  135. static const int us_fv_034[] = { 3, 4, 4, 4, 4, 5, 1, 3, -1 };
  136. static const int us_fv_035[] = { 3, 4, 4, 4, 4, 10, 9, 0, -1 };
  137. static const int us_fv_036[] = { 3, 4, 4, 4, 4, 12, 9, 3, -1 };
  138. static const int us_fv_037[] = { 3, 4, 4, 4, 4, 12, 11, 3, -1 };
  139. static const int us_fv_038[] = { 3, 4, 4, 4, 4, 5, 9, 3, -1 };
  140. static const int us_fv_039[] = { 3, 4, 4, 4, 4, 12, 8, 3, -1 };
  141. static const int us_fv_040[] = { 0, 5, 6, 2, 0, 4, 4, 4, -1 };
  142. static const int us_fv_041[] = { 0, 1, 6, 2, 0, 4, 4, 4, -1 };
  143. static const int us_fv_042[] = { 3, 4, 4, 4, 4, 12, 14, 0, -1 };
  144. static const int us_fv_043[] = { 3, 4, 4, 4, 4, 10, 1, 0, -1 };
  145. static const int us_fv_044[] = { 3, 4, 4, 4, 4, 10, 11, 0, -1 };
  146. static const int us_fv_045[] = { 3, 4, 4, 4, 4, 12, 9, 0, -1 };
  147. static const int us_fv_046[] = { 3, 4, 4, 4, 4, 12, 11, 0, -1 };
  148. static const int us_fv_047[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
  149. static const int us_fv_048[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
  150. static const int us_fv_049[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
  151. static const int us_fv_050[] = { 0 };
  152. static const int * const us_fvtable[] = {
  153. us_fv_000,
  154. us_fv_001,
  155. us_fv_002,
  156. us_fv_003,
  157. us_fv_004,
  158. us_fv_005,
  159. us_fv_006,
  160. us_fv_007,
  161. us_fv_008,
  162. us_fv_009,
  163. us_fv_010,
  164. us_fv_011,
  165. us_fv_012,
  166. us_fv_013,
  167. us_fv_014,
  168. us_fv_015,
  169. us_fv_016,
  170. us_fv_017,
  171. us_fv_018,
  172. us_fv_019,
  173. us_fv_020,
  174. us_fv_021,
  175. us_fv_022,
  176. us_fv_023,
  177. us_fv_024,
  178. us_fv_025,
  179. us_fv_026,
  180. us_fv_027,
  181. us_fv_028,
  182. us_fv_029,
  183. us_fv_030,
  184. us_fv_031,
  185. us_fv_032,
  186. us_fv_033,
  187. us_fv_034,
  188. us_fv_035,
  189. us_fv_036,
  190. us_fv_037,
  191. us_fv_038,
  192. us_fv_039,
  193. us_fv_040,
  194. us_fv_041,
  195. us_fv_042,
  196. us_fv_043,
  197. us_fv_044,
  198. us_fv_045,
  199. us_fv_046,
  200. us_fv_047,
  201. us_fv_048,
  202. us_fv_049,
  203. us_fv_050 };
  204. DEF_STATIC_CONST_VAL_STRING(featval_0,"+");
  205. DEF_STATIC_CONST_VAL_STRING(featval_1,"l");
  206. DEF_STATIC_CONST_VAL_STRING(featval_2,"3");
  207. DEF_STATIC_CONST_VAL_STRING(featval_3,"-");
  208. DEF_STATIC_CONST_VAL_STRING(featval_4,"0");
  209. DEF_STATIC_CONST_VAL_STRING(featval_5,"s");
  210. DEF_STATIC_CONST_VAL_STRING(featval_6,"1");
  211. DEF_STATIC_CONST_VAL_STRING(featval_7,"2");
  212. DEF_STATIC_CONST_VAL_STRING(featval_8,"d");
  213. DEF_STATIC_CONST_VAL_STRING(featval_9,"a");
  214. DEF_STATIC_CONST_VAL_STRING(featval_10,"r");
  215. DEF_STATIC_CONST_VAL_STRING(featval_11,"p");
  216. DEF_STATIC_CONST_VAL_STRING(featval_12,"f");
  217. DEF_STATIC_CONST_VAL_STRING(featval_13,"n");
  218. DEF_STATIC_CONST_VAL_STRING(featval_14,"b");
  219. DEF_STATIC_CONST_VAL_STRING(featval_15,"v");
  220. DEF_STATIC_CONST_VAL_STRING(featval_16,"g");
  221. static const cst_val * const us_featvals[] = {
  222. (cst_val *)&featval_0,
  223. (cst_val *)&featval_1,
  224. (cst_val *)&featval_2,
  225. (cst_val *)&featval_3,
  226. (cst_val *)&featval_4,
  227. (cst_val *)&featval_5,
  228. (cst_val *)&featval_6,
  229. (cst_val *)&featval_7,
  230. (cst_val *)&featval_8,
  231. (cst_val *)&featval_9,
  232. (cst_val *)&featval_10,
  233. (cst_val *)&featval_11,
  234. (cst_val *)&featval_12,
  235. (cst_val *)&featval_13,
  236. (cst_val *)&featval_14,
  237. (cst_val *)&featval_15,
  238. (cst_val *)&featval_16,
  239. NULL };
  240. const cst_phoneset us_phoneset = {
  241. "us",
  242. us_featnames,
  243. us_featvals,
  244. us_phonenames,
  245. "pau",
  246. 50,
  247. us_fvtable,
  248. 0 /* not freeable */
  249. };