first commit

This commit is contained in:
Your Name
2022-10-20 20:29:11 +08:00
commit 4d531f8044
3238 changed files with 1387862 additions and 0 deletions
@@ -0,0 +1,173 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 1999-2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 2000 */
/*************************************************************************/
/* */
/* A simple voice defintion */
/* */
/*************************************************************************/
/* ----------------------------------------------------------------- */
/* The English TTS System "Flite+hts_engine" */
/* developed by HTS Working Group */
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2005-2008 Tokyo Institute of Technology */
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* - Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* - Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials provided */
/* with the distribution. */
/* - Neither the name of the HTS working group nor the names of its */
/* contributors may be used to endorse or promote products derived */
/* from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */
/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */
/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
/* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */
/* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */
/* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* ----------------------------------------------------------------- */
#include "flite.h"
#ifndef FLITE_PLUS_HTS_ENGINE
#include "cst_diphone.h"
#endif /* !FLITE_PLUS_HTS_ENGINE */
#include "usenglish.h"
#include "cmu_lex.h"
static cst_utterance *cmu_us_kal_postlex(cst_utterance *u);
#ifndef FLITE_PLUS_HTS_ENGINE
extern cst_diphone_db cmu_us_kal_db;
#endif /* !FLITE_PLUS_HTS_ENGINE */
cst_voice *cmu_us_kal_diphone = NULL;
cst_voice *register_cmu_us_kal(const char *voxdir)
{
cst_voice *v;
cst_lexicon *lex;
if (cmu_us_kal_diphone)
return cmu_us_kal_diphone; /* Already registered */
v = new_voice();
v->name = "kal";
/* Set up basic values for synthesizing with this voice */
usenglish_init(v);
#ifndef FLITE_PLUS_HTS_ENGINE
flite_feat_set_string(v->features,"name","cmu_us_kal_diphone");
#endif /* !FLITE_PLUS_HTS_ENGINE */
/* Lexicon */
lex = cmu_lex_init();
flite_feat_set(v->features,"lexicon",lexicon_val(lex));
#ifndef FLITE_PLUS_HTS_ENGINE
/* Intonation */
flite_feat_set_float(v->features,"int_f0_target_mean",95.0);
flite_feat_set_float(v->features,"int_f0_target_stddev",11.0);
flite_feat_set_float(v->features,"duration_stretch",1.1);
#endif /* !FLITE_PLUS_HTS_ENGINE */
/* Post lexical rules */
flite_feat_set(v->features,"postlex_func",uttfunc_val(&cmu_us_kal_postlex));
#ifndef FLITE_PLUS_HTS_ENGINE
/* Waveform synthesis: diphone_synth */
flite_feat_set(v->features,"wave_synth_func",uttfunc_val(&diphone_synth));
flite_feat_set(v->features,"diphone_db",diphone_db_val(&cmu_us_kal_db));
flite_feat_set_int(v->features,"sample_rate",cmu_us_kal_db.sts->sample_rate);
flite_feat_set_string(v->features,"resynth_type","fixed");
flite_feat_set_string(v->features,"join_type","modified_lpc");
#endif /* !FLITE_PLUS_HTS_ENGINE */
cmu_us_kal_diphone = v;
return cmu_us_kal_diphone;
}
void unregister_cmu_us_kal(cst_voice *v)
{
if (v != cmu_us_kal_diphone)
return;
delete_voice(v);
cmu_us_kal_diphone = NULL;
}
#ifndef FLITE_PLUS_HTS_ENGINE
static void fix_ah(cst_utterance *u)
{
/* This should really be done in the index itself */
const cst_item *s;
for (s=relation_head(utt_relation(u,"Segment")); s; s=item_next(s))
if (cst_streq(item_feat_string(s,"name"),"ah"))
item_set_string(s,"name","aa");
}
#endif /* !FLITE_PLUS_HTS_ENGINE */
static cst_utterance *cmu_us_kal_postlex(cst_utterance *u)
{
cmu_postlex(u);
#ifndef FLITE_PLUS_HTS_ENGINE
fix_ah(u);
#endif /* !FLITE_PLUS_HTS_ENGINE */
return u;
}
+374
View File
@@ -0,0 +1,374 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* CMU Lexicon definition */
/* */
/*************************************************************************/
#include "flite.h"
#include "cmu_lex.h"
extern const int cmu_lex_entry[];
extern const unsigned char cmu_lex_data[];
extern const int cmu_lex_num_entries;
extern const int cmu_lex_num_bytes;
extern const char * const cmu_lex_phone_table[54];
extern const char * const cmu_lex_phones_huff_table[];
extern const char * const cmu_lex_entries_huff_table[];
static int cmu_is_vowel(const char *p);
static int cmu_is_silence(const char *p);
static int cmu_has_vowel_in_list(const cst_val *v);
static int cmu_has_vowel_in_syl(const cst_item *i);
static int cmu_sonority(const char *p);
static const char * const addenda0[] = { "p,", NULL };
static const char * const addenda1[] = { "p.", NULL };
static const char * const addenda2[] = { "p(", NULL };
static const char * const addenda3[] = { "p)", NULL };
static const char * const addenda4[] = { "p[", NULL };
static const char * const addenda5[] = { "p]", NULL };
static const char * const addenda6[] = { "p{", NULL };
static const char * const addenda7[] = { "p}", NULL };
static const char * const addenda8[] = { "p:", NULL };
static const char * const addenda9[] = { "p;", NULL };
static const char * const addenda10[] = { "p?", NULL};
static const char * const addenda11[] = { "p!", NULL };
static const char * const addenda12[] = { "n@", "ae1", "t", NULL };
static const char * const addenda13[] = { "n#", "hh", "ae1","sh", NULL };
static const char * const addenda14[] = { "n$", "d", "aa1", "l", "er", NULL };
static const char * const addenda15[] = { "n%", "p", "er", "s", "eh1", "n", "t", NULL };
static const char * const addenda16[] = { "n^", "k", "eh1", "r", "eh1", "t", NULL };
static const char * const addenda17[] = { "n&","ae1","m","p","er","s","ae1","n","d", NULL };
static const char * const addenda18[] = { "n*","ae1","s","t","er","ih1","s","k",NULL };
static const char * const addenda19[] = { "n|","b","aa1","r",NULL };
static const char * const addenda20[] = { "n\\","b","ae1","k","s","l","ae1","sh",NULL };
static const char * const addenda21[] = { "n=","iy1","k","w","ax","l","z",NULL};
static const char * const addenda22[] = { "n+","p","l","ah1","s",NULL};
static const char * const addenda23[] = { "n~","t","ih1","l","d","ax",NULL};
static const char * const addenda24[] = { "p'",NULL};
static const char * const addenda25[] = { "p`",NULL};
static const char * const addenda26[] = { "p\"",NULL};
static const char * const addenda27[] = { "p-",NULL};
static const char * const addenda28[] = { "p<",NULL};
static const char * const addenda29[] = { "p>",NULL};
static const char * const addenda30[] = { "n_","ah1","n","d","er","s","k","ao1","r",NULL};
static const char * const addenda31[] = { "s's","z",NULL};
static const char * const addenda32[] = { "nim","ay1","m",NULL};
static const char * const addenda33[] = { "vdoesnt","d","ah1","z","n","t",NULL};
static const char * const addenda34[] = { "vyoull","y","uw1","l",NULL};
static const char * const addenda35[] = { "n/","s","l","ae1","sh",NULL};
static const char * const addenda36[] = { "nin","ih","n",NULL};
static const char * const addenda37[] = { "nto","t","ax",NULL};
static const char * const addenda38[] = { "n_a","ey",NULL};
static const char * const addenda39[] = { "vhavent","hh","ae1","v","ax","n","t",NULL};
static const char * const * const addenda[] = {
addenda0,
addenda1,
addenda2,
addenda3,
addenda4,
addenda5,
addenda6,
addenda7,
addenda8,
addenda9,
addenda10,
addenda11,
addenda12,
addenda13,
addenda14,
addenda15,
addenda16,
addenda17,
addenda18,
addenda19,
addenda20,
addenda21,
addenda22,
addenda23,
addenda24,
addenda25,
addenda26,
addenda27,
addenda28,
addenda29,
addenda30,
addenda31,
addenda32,
addenda33,
addenda34,
addenda35,
addenda36,
addenda37,
addenda38,
addenda39,
NULL };
static int cmu_is_silence(const char *p)
{
if (cst_streq(p,"pau"))
return TRUE;
else
return FALSE;
}
static int cmu_has_vowel_in_list(const cst_val *v)
{
const cst_val *t;
for (t=v; t; t=val_cdr(t))
if (cmu_is_vowel(val_string(val_car(t))))
return TRUE;
return FALSE;
}
static int cmu_has_vowel_in_syl(const cst_item *i)
{
const cst_item *n;
for (n=i; n; n=item_prev(n))
if (cmu_is_vowel(item_feat_string(n,"name")))
return TRUE;
return FALSE;
}
static int cmu_is_vowel(const char *p)
{
/* this happens to work for US English phoneset */
if (strchr("aeiou",p[0]) == NULL)
return FALSE;
else
return TRUE;
}
static int cmu_sonority(const char *p)
{
/* A bunch of hacks for US English phoneset */
if (cmu_is_vowel(p) || (cmu_is_silence(p)))
return 5;
else if (strchr("wylr",p[0]) != NULL)
return 4; /* glides/liquids */
else if (strchr("nm",p[0]) != NULL)
return 3; /* nasals */
else if (strchr("bdgjlmnnnrvwyz",p[0]) != NULL)
return 2; /* voiced obstruents */
else
return 1;
}
int cmu_syl_boundary(const cst_item *i,const cst_val *rest)
{
/* Returns TRUE if this should be a syllable boundary */
/* This is of course phone set dependent */
int p, n, nn;
if (rest == NULL)
return TRUE;
else if (cmu_is_silence(val_string(val_car(rest))))
return TRUE;
else if (!cmu_has_vowel_in_list(rest)) /* no more vowels so rest *all* coda */
return FALSE;
else if (!cmu_has_vowel_in_syl(i)) /* need a vowel */
return FALSE;
else if (cmu_is_vowel(val_string(val_car(rest))))
return TRUE;
else if (val_cdr(rest) == NULL)
return FALSE;
else
{ /* so there is following vowel, and multiple phones left */
p = cmu_sonority(item_feat_string(i,"name"));
n = cmu_sonority(val_string(val_car(rest)));
nn = cmu_sonority(val_string(val_car(val_cdr(rest))));
if ((p <= n) && (n <= nn))
return TRUE;
else
return FALSE;
}
}
static int cmulex_dist_to_vowel(const cst_val *rest)
{
if (rest == 0)
return 0; /* shouldn't get here */
else if (cmu_is_vowel(val_string(val_car(rest))))
return 0;
else
return 1+cmulex_dist_to_vowel(val_cdr(rest));
}
static const char * const cmulex_onset_trigrams[] = {
"str", "spy", "spr", "spl", "sky", "skw", "skr", "skl", NULL
};
static const char * const cmulex_onset_bigrams[] = {
"zw", "zl",
"vy", "vr", "vl",
"thw", "thr",
"ty", "tw",
"tr", /* "ts", */
"shw", "shr", "shn", "shm", "shl",
"sw", "sv", "st", "sr", "sp", "sn", "sm", "sl", "sk", "sf",
"py", "pw", "pr", "pl",
"ny",
"my", "mr",
"ly",
"ky", "kw", "kr", "kl",
"hhy", "hhw", "hhr", "hhl",
"gy", "gw", "gr", "gl",
"fy", "fr", "fl",
"dy", "dw", "dr",
"by", "bw", "br", "bl",
NULL
};
static int cmulex_onset_bigram(const cst_val *rest)
{
char x[10];
int i;
cst_sprintf(x,"%s%s",val_string(val_car(rest)),
val_string(val_car(val_cdr(rest))));
for (i=0; cmulex_onset_bigrams[i]; i++)
if (cst_streq(x,cmulex_onset_bigrams[i]))
return TRUE;
return FALSE;
}
static int cmulex_onset_trigram(const cst_val *rest)
{
char x[15];
int i;
cst_sprintf(x,"%s%s%s",val_string(val_car(rest)),
val_string(val_car(val_cdr(rest))),
val_string(val_car(val_cdr(val_cdr(rest)))));
for (i=0; cmulex_onset_trigrams[i]; i++)
if (cst_streq(x,cmulex_onset_trigrams[i]))
return TRUE;
return FALSE;
}
int cmu_syl_boundary_mo(const cst_item *i,const cst_val *rest)
{
/* syl boundary maximal onset */
int d2v;
if (rest == NULL)
return TRUE;
else if (cmu_is_silence(val_string(val_car(rest))))
return TRUE;
else if (!cmu_has_vowel_in_list(rest))
/* no more vowels so rest *all* coda */
return FALSE;
else if (!cmu_has_vowel_in_syl(i)) /* need a vowel */
/* no vowel yet in syl so keep copying */
return FALSE;
else if (cmu_is_vowel(val_string(val_car(rest))))
/* next is a vowel, syl has vowel, so this is a break */
return TRUE;
else if (cst_streq("ng",val_string(val_car(rest))))
/* next is "ng" which can't start a word internal syl */
return FALSE;
else
{
/* want to know if from rest to the next vowel is a valid onset */
d2v = cmulex_dist_to_vowel(rest);
if (d2v < 2)
return TRUE;
else if (d2v > 3)
return FALSE;
else if (d2v == 2)
return cmulex_onset_bigram(rest);
else /* if (d2v == 3) */
return cmulex_onset_trigram(rest);
return TRUE;
}
}
cst_lexicon cmu_lex;
cst_lts_rules cmu_lts_rules;
extern const char * const cmu_lts_phone_table[];
extern const char * const cmu_lts_letter_table[];
extern const cst_lts_addr cmu_lts_letter_index[];
extern const cst_lts_model cmu_lts_model[];
cst_lexicon *cmu_lex_init()
{
/* I'd like to do this as a const but it needs everything in this */
/* file and already the bits are too big for some compilers */
if (cmu_lts_rules.name)
return &cmu_lex; /* Already initialized */
cmu_lts_rules.name = "cmu";
cmu_lts_rules.letter_index = cmu_lts_letter_index;
#ifdef CST_NO_STATIC_LTS_MODEL
/* cmu_lts_rules.models will be set elsewhere */
#else
cmu_lts_rules.models = cmu_lts_model;
#endif
cmu_lts_rules.phone_table = cmu_lts_phone_table;
cmu_lts_rules.context_window_size = 4;
cmu_lts_rules.context_extra_feats = 1;
cmu_lts_rules.letter_table = 0 /* cmu_lts_letter_table */;
cmu_lex.name = "cmu";
cmu_lex.num_entries = cmu_lex_num_entries;
#ifdef CST_NO_STATIC_LEX
/* cmu_lex.data will be set elsewhere */
#else
cmu_lex.data = cmu_lex_data;
#endif
cmu_lex.num_bytes = cmu_lex_num_bytes;
cmu_lex.phone_table = (char **) cmu_lex_phone_table;
cmu_lex.syl_boundary = cmu_syl_boundary_mo;
cmu_lex.addenda = (char ***) addenda;
cmu_lex.lts_rule_set = (cst_lts_rules *) &cmu_lts_rules;
cmu_lex.phone_hufftable = cmu_lex_phones_huff_table;
cmu_lex.entry_hufftable = cmu_lex_entries_huff_table;
cmu_lex.postlex = cmu_postlex;
return &cmu_lex;
}
+55
View File
@@ -0,0 +1,55 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001-2008 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2008 */
/*************************************************************************/
/* CMU Lexicon public functions */
/*************************************************************************/
#ifndef _CMU_LEX_H_
#define _CMU_LEX_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cst_lexicon.h"
cst_lexicon *cmu_lex_init(void);
cst_utterance *cmu_postlex(cst_utterance *u);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif
@@ -0,0 +1,10 @@
/*******************************************************/
/** generated lexicon data file from cmu */
/*******************************************************/
const unsigned char cmu_lex_data[] =
{
0,
#include "cmu_lex_data_raw.c"
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,88 @@
/*******************************************************/
/** generated lexicon entry file from cmu */
/*******************************************************/
#include "cst_string.h"
#include "cst_lexicon.h"
const int cmu_lex_num_bytes =
#include "cmu_lex_num_bytes.c"
;
const int cmu_lex_num_entries = 36963;
const char * const cmu_lex_phone_table[57] =
{
"_epsilon_",
"ax0",
"ey1",
"l",
"p",
"ih1",
"r",
"t",
"g",
"er0",
"b",
"aa1",
"n",
"k",
"th",
"eh0",
"s",
"m",
"ao1",
"eh1",
"d",
"aa0",
"ae1",
"ow1",
"ih0",
"iy0",
"ow0",
"ey0",
"uw1",
"v",
"iy1",
"z",
"uw0",
"ng",
"sh",
"ae0",
"ah1",
"ao0",
"f",
"hh",
"ay1",
"jh",
"aw1",
"aw0",
"ch",
"zh",
"y",
"uh1",
"dh",
"w",
"er1",
"oy1",
"ay0",
"oy0",
"uh0",
"ah0",
NULL
};
const char * const cmu_lex_phones_huff_table[257] =
{
NULL, /* reserved */
#include "cmu_lex_phones_huff_table.c"
NULL
};
const char * const cmu_lex_entries_huff_table[257] =
{
NULL, /* reserved */
#include "cmu_lex_entries_huff_table.c"
NULL
};
@@ -0,0 +1,254 @@
"q" , /* 0.000147 */
"ment" , /* 0.000733 */
"ors" , /* 0.000733 */
"0del" , /* 0.000739 */
"gr" , /* 0.000739 */
"iss" , /* 0.000739 */
"ano" , /* 0.000750 */
"enb" , /* 0.000750 */
"ette" , /* 0.000750 */
"ult" , /* 0.000750 */
"0im" , /* 0.000762 */
"ug" , /* 0.000762 */
"0ab" , /* 0.000768 */
"0th" , /* 0.000774 */
"orn" , /* 0.000774 */
"ost" , /* 0.000780 */
"pl" , /* 0.000780 */
"0ac" , /* 0.000785 */
"eb" , /* 0.000791 */
"ern" , /* 0.000791 */
"ord" , /* 0.000791 */
"let" , /* 0.000803 */
"owski" , /* 0.000815 */
"pr" , /* 0.000821 */
"ind" , /* 0.000826 */
"ann" , /* 0.000832 */
"iel" , /* 0.000832 */
"ina" , /* 0.000838 */
"0el" , /* 0.000850 */
"ted" , /* 0.000850 */
"ish" , /* 0.000856 */
"0fr" , /* 0.000862 */
"ok" , /* 0.000867 */
"ally" , /* 0.000873 */
"oll" , /* 0.000873 */
"ons" , /* 0.000879 */
"ge" , /* 0.000885 */
"ial" , /* 0.000885 */
"af" , /* 0.000891 */
"ath" , /* 0.000897 */
"ick" , /* 0.000920 */
"0dis" , /* 0.000926 */
"0pro" , /* 0.000938 */
"ont" , /* 0.000938 */
"0car" , /* 0.000950 */
"ins" , /* 0.000950 */
"able" , /* 0.000955 */
"0sp" , /* 0.000996 */
"ph" , /* 0.001002 */
"ino" , /* 0.001008 */
"ast" , /* 0.001043 */
"enc" , /* 0.001067 */
"ore" , /* 0.001067 */
"0y" , /* 0.001078 */
"her" , /* 0.001084 */
"our" , /* 0.001084 */
"0gr" , /* 0.001090 */
"ki" , /* 0.001090 */
"one" , /* 0.001090 */
"ler" , /* 0.001102 */
"ev" , /* 0.001114 */
"0br" , /* 0.001120 */
"0ad" , /* 0.001131 */
"az" , /* 0.001131 */
"ett" , /* 0.001172 */
"0am" , /* 0.001178 */
"0ex" , /* 0.001196 */
"ik" , /* 0.001207 */
"err" , /* 0.001225 */
"ew" , /* 0.001225 */
"co" , /* 0.001243 */
"if" , /* 0.001248 */
"eg" , /* 0.001254 */
"man" , /* 0.001272 */
"aw" , /* 0.001284 */
"0sh" , /* 0.001295 */
"ek" , /* 0.001295 */
"up" , /* 0.001295 */
"0com" , /* 0.001301 */
"0pr" , /* 0.001307 */
"ne" , /* 0.001313 */
"ans" , /* 0.001319 */
"gh" , /* 0.001348 */
"anc" , /* 0.001354 */
"ated" , /* 0.001360 */
"ous" , /* 0.001372 */
"ud" , /* 0.001372 */
"0tr" , /* 0.001377 */
"ob" , /* 0.001389 */
"ort" , /* 0.001389 */
"ski" , /* 0.001389 */
"0mar" , /* 0.001407 */
"st" , /* 0.001413 */
"ach" , /* 0.001418 */
"ies" , /* 0.001430 */
"he" , /* 0.001436 */
"ass" , /* 0.001489 */
"ah" , /* 0.001495 */
"uc" , /* 0.001495 */
"0ar" , /* 0.001501 */
"ub" , /* 0.001506 */
"end" , /* 0.001524 */
"ert" , /* 0.001559 */
"0z" , /* 0.001571 */
"ich" , /* 0.001577 */
"ens" , /* 0.001583 */
"ly" , /* 0.001583 */
"ang" , /* 0.001629 */
"ier" , /* 0.001629 */
"op" , /* 0.001635 */
"0st" , /* 0.001641 */
"0le" , /* 0.001670 */
"ity" , /* 0.001670 */
"arr" , /* 0.001682 */
"ip" , /* 0.001735 */
"ate" , /* 0.001770 */
"ou" , /* 0.001782 */
"iz" , /* 0.001788 */
"ie" , /* 0.001817 */
"ib" , /* 0.001823 */
"0mc" , /* 0.001835 */
"ak" , /* 0.001852 */
"ov" , /* 0.001870 */
"ey" , /* 0.001876 */
"0sch" , /* 0.001893 */
"art" , /* 0.001893 */
"ay" , /* 0.001969 */
"ter" , /* 0.002005 */
"io" , /* 0.002040 */
"0de" , /* 0.002134 */
"ff" , /* 0.002186 */
"oc" , /* 0.002192 */
"0e" , /* 0.002198 */
"ion" , /* 0.002216 */
"od" , /* 0.002227 */
"0con" , /* 0.002268 */
"0al" , /* 0.002286 */
"ard" , /* 0.002298 */
"ine" , /* 0.002327 */
"um" , /* 0.002339 */
"est" , /* 0.002374 */
"0un" , /* 0.002391 */
"ian" , /* 0.002415 */
"ill" , /* 0.002450 */
"all" , /* 0.002462 */
"og" , /* 0.002468 */
"ess" , /* 0.002479 */
"av" , /* 0.002520 */
"ap" , /* 0.002538 */
"ow" , /* 0.002556 */
"te" , /* 0.002591 */
"0j" , /* 0.002614 */
"0ch" , /* 0.002685 */
"tr" , /* 0.002708 */
"j" , /* 0.002731 */
"au" , /* 0.002767 */
"0o" , /* 0.002796 */
"ant" , /* 0.002813 */
"ation" , /* 0.002854 */
"ia" , /* 0.002866 */
"ers" , /* 0.002907 */
"qu" , /* 0.002931 */
"iv" , /* 0.002989 */
"ab" , /* 0.002995 */
"0re" , /* 0.003030 */
"and" , /* 0.003171 */
"ist" , /* 0.003212 */
"x" , /* 0.003212 */
"im" , /* 0.003253 */
"un" , /* 0.003318 */
"ir" , /* 0.003505 */
"ul" , /* 0.003570 */
"ot" , /* 0.003646 */
"ut" , /* 0.003792 */
"ig" , /* 0.003804 */
"0in" , /* 0.003822 */
"ell" , /* 0.003851 */
"id" , /* 0.003956 */
"0a" , /* 0.004033 */
"om" , /* 0.004203 */
"ent" , /* 0.004261 */
"ec" , /* 0.004308 */
"ad" , /* 0.004384 */
"0w" , /* 0.004460 */
"em" , /* 0.004496 */
"ag" , /* 0.004572 */
"0n" , /* 0.004589 */
"w" , /* 0.004672 */
"0v" , /* 0.004841 */
"re" , /* 0.004853 */
"ro" , /* 0.005029 */
"ac" , /* 0.005252 */
"ch" , /* 0.005357 */
"il" , /* 0.005398 */
"us" , /* 0.005451 */
"0t" , /* 0.005697 */
"0f" , /* 0.005814 */
"am" , /* 0.005855 */
"le" , /* 0.005855 */
"et" , /* 0.006119 */
"0k" , /* 0.006207 */
"f" , /* 0.006248 */
"ur" , /* 0.006283 */
"os" , /* 0.006700 */
"z" , /* 0.006764 */
"as" , /* 0.006916 */
"is" , /* 0.007250 */
"0l" , /* 0.007315 */
"0g" , /* 0.007678 */
"ol" , /* 0.007708 */
"ing" , /* 0.007725 */
"0h" , /* 0.007889 */
"v" , /* 0.008270 */
"0r" , /* 0.008329 */
"it" , /* 0.008511 */
"at" , /* 0.008657 */
"g" , /* 0.008681 */
"0d" , /* 0.008827 */
"el" , /* 0.008827 */
"b" , /* 0.009015 */
"or" , /* 0.009073 */
"m" , /* 0.009173 */
"k" , /* 0.009226 */
"d" , /* 0.009449 */
"ic" , /* 0.009484 */
"u" , /* 0.009654 */
"ed" , /* 0.009771 */
"an" , /* 0.010498 */
"p" , /* 0.010591 */
"l" , /* 0.010890 */
"n" , /* 0.010896 */
"0p" , /* 0.011230 */
"c" , /* 0.011295 */
"en" , /* 0.011365 */
"0c" , /* 0.011670 */
"in" , /* 0.011693 */
"r" , /* 0.011793 */
"t" , /* 0.012086 */
"al" , /* 0.012139 */
"on" , /* 0.012350 */
"ar" , /* 0.012473 */
"0s" , /* 0.012549 */
"0b" , /* 0.012825 */
"es" , /* 0.013206 */
"h" , /* 0.013616 */
"0m" , /* 0.014132 */
"0" , /* 0.014489 */
"y" , /* 0.014900 */
"i" , /* 0.016986 */
"s" , /* 0.017185 */
"o" , /* 0.018803 */
"er" , /* 0.019331 */
"a" , /* 0.021816 */
"e" , /* 0.027378 */
@@ -0,0 +1 @@
410522
@@ -0,0 +1,254 @@
"\067" , /* 0.000024 */
"\065" , /* 0.000380 */
"\021\013\006" , /* 0.000771 */
"\002\007\001\024" , /* 0.000777 */
"\013\007" , /* 0.000783 */
"\021\026\014" , /* 0.000783 */
"\001\004" , /* 0.000789 */
"\046\031" , /* 0.000789 */
"\003\036" , /* 0.000801 */
"\010\011" , /* 0.000801 */
"\013\006\024" , /* 0.000801 */
"\015\001\003" , /* 0.000801 */
"\026\024" , /* 0.000813 */
"\036\014\001" , /* 0.000813 */
"\004\001\003" , /* 0.000819 */
"\001\012\001\003" , /* 0.000825 */
"\005\021" , /* 0.000825 */
"\022\006\001" , /* 0.000831 */
"\050\006" , /* 0.000831 */
"\012\026" , /* 0.000837 */
"\030\007\031" , /* 0.000837 */
"\044\003" , /* 0.000843 */
"\017\020" , /* 0.000849 */
"\032\014" , /* 0.000849 */
"\013\020" , /* 0.000855 */
"\004\026" , /* 0.000874 */
"\036\037" , /* 0.000874 */
"\050\024" , /* 0.000874 */
"\001\014\024" , /* 0.000916 */
"\005\010" , /* 0.000916 */
"\012\003" , /* 0.000928 */
"\046\003" , /* 0.000928 */
"\001\003\031" , /* 0.000934 */
"\001\014\037" , /* 0.000934 */
"\013\014\032" , /* 0.000934 */
"\020\011" , /* 0.000934 */
"\066" , /* 0.000934 */
"\005\003\001" , /* 0.000940 */
"\012\062" , /* 0.000940 */
"\030\051" , /* 0.000940 */
"\013\010" , /* 0.000946 */
"\050\007" , /* 0.000952 */
"\012\031" , /* 0.000958 */
"\005\037" , /* 0.000964 */
"\022\014" , /* 0.000964 */
"\023\014\007" , /* 0.000964 */
"\015\001\021" , /* 0.000970 */
"\032\003" , /* 0.000976 */
"\036\003" , /* 0.000982 */
"\036\014\032" , /* 0.000982 */
"\005\020\007" , /* 0.000994 */
"\020\001\003" , /* 0.000994 */
"\023\024" , /* 0.000994 */
"\043\015" , /* 0.000994 */
"\060" , /* 0.000994 */
"\025\021" , /* 0.001000 */
"\051\031" , /* 0.001012 */
"\054\031" , /* 0.001018 */
"\015\011" , /* 0.001024 */
"\007\001\024" , /* 0.001030 */
"\023\003\001" , /* 0.001036 */
"\023\021" , /* 0.001036 */
"\053" , /* 0.001042 */
"\013\003\001" , /* 0.001054 */
"\037\031" , /* 0.001078 */
"\022\006\031" , /* 0.001084 */
"\023\020\007" , /* 0.001084 */
"\001\020\007" , /* 0.001090 */
"\015\027" , /* 0.001109 */
"\026\014\024" , /* 0.001109 */
"\023\020" , /* 0.001115 */
"\003\026" , /* 0.001127 */
"\001\014\020" , /* 0.001133 */
"\024\036" , /* 0.001133 */
"\006\027" , /* 0.001151 */
"\057\006" , /* 0.001157 */
"\036\014\031" , /* 0.001163 */
"\022\046" , /* 0.001193 */
"\021\011" , /* 0.001199 */
"\005\007" , /* 0.001223 */
"\027\014\031" , /* 0.001223 */
"\005\020" , /* 0.001247 */
"\006\023" , /* 0.001259 */
"\035\031" , /* 0.001277 */
"\002\003" , /* 0.001289 */
"\046\011" , /* 0.001289 */
"\050\037" , /* 0.001289 */
"\024\032" , /* 0.001295 */
"\017\015" , /* 0.001313 */
"\007\001\014" , /* 0.001319 */
"\041\015" , /* 0.001319 */
"\020\036" , /* 0.001325 */
"\063" , /* 0.001325 */
"\030\010" , /* 0.001331 */
"\012\001\003" , /* 0.001362 */
"\021\026" , /* 0.001374 */
"\024\006" , /* 0.001380 */
"\055" , /* 0.001392 */
"\004\011" , /* 0.001398 */
"\030\020\007" , /* 0.001416 */
"\030\021" , /* 0.001422 */
"\013\021" , /* 0.001458 */
"\017\003" , /* 0.001464 */
"\046\006" , /* 0.001488 */
"\004\003" , /* 0.001494 */
"\056\040" , /* 0.001494 */
"\015\001" , /* 0.001506 */
"\023\006\031" , /* 0.001512 */
"\015\061" , /* 0.001536 */
"\015\026" , /* 0.001542 */
"\020\001" , /* 0.001548 */
"\024\023" , /* 0.001572 */
"\007\032" , /* 0.001590 */
"\015\003" , /* 0.001603 */
"\015\013\014" , /* 0.001603 */
"\043\014" , /* 0.001603 */
"\011\037" , /* 0.001627 */
"\041\010" , /* 0.001663 */
"\001\014\007" , /* 0.001681 */
"\025\003" , /* 0.001681 */
"\020\007\006" , /* 0.001711 */
"\005\015" , /* 0.001741 */
"\023\006\001" , /* 0.001765 */
"\045" , /* 0.001771 */
"\030\035" , /* 0.001783 */
"\017\014" , /* 0.001789 */
"\021\004" , /* 0.001789 */
"\022\003" , /* 0.001795 */
"\002\014" , /* 0.001801 */
"\021\001\015" , /* 0.001819 */
"\027\014" , /* 0.001819 */
"\021\001" , /* 0.001874 */
"\035\011" , /* 0.001886 */
"\015\032" , /* 0.001898 */
"\042\001\014" , /* 0.001952 */
"\024\001" , /* 0.001970 */
"\006\036" , /* 0.002018 */
"\001\012" , /* 0.002060 */
"\005\006" , /* 0.002060 */
"\044\014" , /* 0.002072 */
"\013\015" , /* 0.002121 */
"\020\001\014" , /* 0.002139 */
"\024\011" , /* 0.002175 */
"\057" , /* 0.002181 */
"\015\001\014" , /* 0.002193 */
"\013\003" , /* 0.002229 */
"\026\021" , /* 0.002241 */
"\050\014" , /* 0.002253 */
"\030\007" , /* 0.002283 */
"\002\007" , /* 0.002289 */
"\030\037" , /* 0.002295 */
"\027\003" , /* 0.002313 */
"\023\007" , /* 0.002325 */
"\024\031" , /* 0.002332 */
"\012\011" , /* 0.002416 */
"\015\006" , /* 0.002434 */
"\020\031" , /* 0.002458 */
"\024\030" , /* 0.002470 */
"\041" , /* 0.002470 */
"\020\004" , /* 0.002494 */
"\043" , /* 0.002506 */
"\036\014" , /* 0.002603 */
"\001\024" , /* 0.002609 */
"\005\003" , /* 0.002663 */
"\012\006" , /* 0.002669 */
"\045\006" , /* 0.002693 */
"\010\006" , /* 0.002729 */
"\015\013" , /* 0.002735 */
"\007\001" , /* 0.002741 */
"\002\042\001\014" , /* 0.002850 */
"\025\014" , /* 0.002862 */
"\026\003" , /* 0.002886 */
"\001\037" , /* 0.002910 */
"\030\024" , /* 0.003054 */
"\026\015" , /* 0.003109 */
"\030\003" , /* 0.003175 */
"\064" , /* 0.003175 */
"\007\031" , /* 0.003217 */
"\007\011" , /* 0.003271 */
"\001\015" , /* 0.003368 */
"\021\001\014" , /* 0.003434 */
"\020\015\031" , /* 0.003458 */
"\033" , /* 0.003579 */
"\004\006" , /* 0.003705 */
"\056\034" , /* 0.003723 */
"\023\015" , /* 0.003946 */
"\007\006" , /* 0.004018 */
"\022" , /* 0.004157 */
"\052" , /* 0.004163 */
"\017" , /* 0.004193 */
"\030\020" , /* 0.004290 */
"\020\015" , /* 0.004368 */
"\023\003" , /* 0.004368 */
"\040" , /* 0.004434 */
"\023\006" , /* 0.004446 */
"\025\006" , /* 0.004488 */
"\007\020" , /* 0.004573 */
"\001\021" , /* 0.004735 */
"\003\001" , /* 0.004814 */
"\016" , /* 0.005109 */
"\013\014" , /* 0.005332 */
"\001\007" , /* 0.005621 */
"\006\031" , /* 0.005675 */
"\013\006" , /* 0.005711 */
"\023\014" , /* 0.005729 */
"\044" , /* 0.005850 */
"\026\014" , /* 0.005970 */
"\005\014" , /* 0.006055 */
"\056" , /* 0.006151 */
"\001\020" , /* 0.006169 */
"\022\006" , /* 0.006266 */
"\062" , /* 0.006404 */
"\003\031" , /* 0.006513 */
"\006\001" , /* 0.006567 */
"\030\041" , /* 0.006711 */
"\030" , /* 0.006910 */
"\025" , /* 0.006958 */
"\050" , /* 0.008127 */
"\030\015" , /* 0.008145 */
"\054" , /* 0.008212 */
"\020\007" , /* 0.008778 */
"\023" , /* 0.008832 */
"\030\014" , /* 0.008922 */
"\042" , /* 0.009826 */
"\051" , /* 0.009941 */
"\034" , /* 0.010182 */
"\026" , /* 0.010242 */
"\005" , /* 0.010645 */
"\061" , /* 0.011073 */
"\031" , /* 0.011314 */
"\013" , /* 0.011567 */
"\036" , /* 0.011652 */
"\027" , /* 0.011941 */
"\002" , /* 0.011947 */
"\001\003" , /* 0.013007 */
"\006" , /* 0.013110 */
"\001\014" , /* 0.013429 */
"\032" , /* 0.013664 */
"\047" , /* 0.013796 */
"\001" , /* 0.013839 */
"\011" , /* 0.014351 */
"\010" , /* 0.015345 */
"\046" , /* 0.015857 */
"\035" , /* 0.016556 */
"\014" , /* 0.016718 */
"\004" , /* 0.018056 */
"\003" , /* 0.018104 */
"\015" , /* 0.019514 */
"\012" , /* 0.021170 */
"\037" , /* 0.022357 */
"\021" , /* 0.025177 */
"\007" , /* 0.026273 */
"\024" , /* 0.026581 */
"\020" , /* 0.029376 */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,154 @@
/*******************************************************/
/** Autogenerated lts rules (regex) for cmu */
/** from wfst/ */
/*******************************************************/
#include "cst_string.h"
#include "cst_lts.h"
#include "cst_lexicon.h"
const char * const cmu_lts_phone_table[76] =
{
"epsilon",
"eh1",
"aa1",
"ey1",
"aw1",
"ax0",
"ao1",
"ay0",
"aa0",
"ey0",
"ae1",
"ih1",
"aw0",
"ow0",
"ao0",
"ow1",
"eh0",
"ih0",
"w-ey1",
"w-ax0",
"y-ax0",
"ae0",
"ay1",
"ah0",
"ah1",
"b",
"ch",
"k",
"s",
"t-s",
"sh",
"d",
"t",
"jh",
"iy1",
"iy0",
"uw1",
"y-uw1",
"oy1",
"y-uw0",
"uw0",
"oy0",
"f",
"g",
"zh",
"hh",
"y",
"l",
"ax0-l",
"m",
"ax0-m",
"m-ae1",
"m-ax0",
"ng",
"n",
"n-y",
"uh1",
"uh0",
"w",
"w-ah1",
"er1",
"p",
"r",
"er0",
"z",
"th",
"dh",
"y-er0",
"y-uh1",
"y-er1",
"v",
"k-s",
"g-zh",
"k-sh",
"g-z",
NULL
};
const char * const cmu_lts_letter_table[30] =
{
"nothing",
"#",
"0",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
NULL
};
const cst_lts_addr cmu_lts_letter_index[27] =
{
0, /* a */
5371, /* b */
5414, /* c */
6048, /* d */
6256, /* e */
10649, /* f */
10666, /* g */
11293, /* h */
11522, /* i */
15403, /* j */
15514, /* k */
15533, /* l */
15900, /* m */
15942, /* n */
16176, /* o */
19793, /* p */
19830, /* q */
19831, /* r */
21775, /* s */
22667, /* t */
22957, /* u */
24709, /* v */
24719, /* w */
24877, /* x */
24923, /* y */
25377, /* z */
0
};
@@ -0,0 +1,110 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001-2008 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: August 2008 */
/*************************************************************************/
/* Moved the CMU lexicon specific postlexical rules into cmulex itself */
/*************************************************************************/
#include "flite.h"
static void apostrophe_s(cst_utterance *u)
{
cst_item *s;
cst_item *schwa;
cst_phoneset *ps=0;
const char *pname, *word;
ps = val_phoneset(feat_val(u->features,"phoneset"));
for (s=item_next(relation_head(utt_relation(u,"Segment")));
s; s=item_next(s))
{
word = val_string(ffeature(s, "R:SylStructure.parent.parent.name"));
if (cst_streq("'s", word))
{
pname = item_feat_string(item_prev(s),"name");
if ((strchr("fa",*phone_feature_string(ps,pname,"ctype")) != NULL)
&& (strchr("dbg",
*phone_feature_string(ps,pname,"cplace")) == NULL))
/* needs a schwa */
{
schwa = item_prepend(s,NULL);
item_set_string(schwa,"name","ax");
item_prepend(item_as(s,"SylStructure"),schwa);
}
else if (cst_streq("-",phone_feature_string(ps,pname,"cvox")))
item_set_string(s,"name","s");
}
else if (cst_streq("'ve", word)
|| cst_streq("'ll", word)
|| cst_streq("'d", word))
{
if (cst_streq("-",ffeature_string(s,"p.ph_vc")))
{
schwa = item_prepend(s,NULL);
item_set_string(schwa,"name","ax");
item_prepend(item_as(s,"SylStructure"),schwa);
}
}
}
}
static void the_iy_ax(cst_utterance *u)
{
const cst_item *i;
const char *word;
for (i = relation_head(utt_relation(u, "Segment")); i; i = item_next(i))
{
if (cst_streq("ax", item_name(i)))
{
word = ffeature_string(i,"R:SylStructure.parent.parent.name");
if (cst_streq("the", word)
&& cst_streq("+", ffeature_string(i,"n.ph_vc")))
item_set_string(i, "name", "iy");
}
}
}
cst_utterance *cmu_postlex(cst_utterance *u)
{
/* Post lexical rules */
apostrophe_s(u);
the_iy_ax(u);
return u;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,410 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* English text expanders */
/* */
/* numbers, digits, ids (years), money */
/* */
/*************************************************************************/
#include <ctype.h>
#include "us_text.h"
static const char * const digit2num[] = {
"zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine" };
static const char * const digit2teen[] = {
"ten", /* shouldn't get called */
"eleven",
"twelve",
"thirteen",
"fourteen",
"fifteen",
"sixteen",
"seventeen",
"eighteen",
"nineteen" };
static const char * const digit2enty[] = {
"zero", /* shouldn't get called */
"ten",
"twenty",
"thirty",
"forty",
"fifty",
"sixty",
"seventy",
"eighty",
"ninety" };
static const char * const ord2num[] = {
"zeroth",
"first",
"second",
"third",
"fourth",
"fifth",
"sixth",
"seventh",
"eighth",
"ninth" };
static const char * const ord2teen[] = {
"tenth", /* shouldn't get called */
"eleventh",
"twelfth",
"thirteenth",
"fourteenth",
"fifteenth",
"sixteenth",
"seventeenth",
"eighteenth",
"nineteenth" };
static const char * const ord2enty[] = {
"zeroth", /* shouldn't get called */
"tenth",
"twentieth",
"thirtieth",
"fortieth",
"fiftieth",
"sixtieth",
"seventieth",
"eightieth",
"ninetieth" };
cst_val *en_exp_number(const char *numstring)
{
/* Expand given token to list of words pronouncing it as a number */
int num_digits = cst_strlen(numstring);
char part[4];
cst_val *p;
int i;
if (num_digits == 0)
return NULL;
else if (num_digits == 1)
return en_exp_digits(numstring);
else if (num_digits == 2)
{
if (numstring[0] == '0')
{
if (numstring[1] == '0')
return 0;
else
return cons_val(string_val(digit2num[numstring[1]-'0']),0);
}
else if (numstring[1] == '0')
return cons_val(string_val(digit2enty[numstring[0]-'0']),0);
else if (numstring[0] == '1')
return cons_val(string_val(digit2teen[numstring[1]-'0']),0);
else
return cons_val(string_val(digit2enty[numstring[0]-'0']),
en_exp_digits(numstring+1));
}
else if (num_digits == 3)
{
if (numstring[0] == '0')
return en_exp_number(numstring+1);
else
return cons_val(string_val(digit2num[numstring[0]-'0']),
cons_val(string_val("hundred"),
en_exp_number(numstring+1)));
}
else if (num_digits < 7)
{
for (i=0; i < num_digits-3; i++)
part[i] = numstring[i];
part[i]='\0';
p = en_exp_number(part);
if (p == 0) /* no thousands */
return en_exp_number(numstring+i);
else
return val_append(p,cons_val(string_val("thousand"),
en_exp_number(numstring+i)));
}
else if (num_digits < 10)
{
for (i=0; i < num_digits-6; i++)
part[i] = numstring[i];
part[i]='\0';
p = en_exp_number(part);
if (p == 0) /* no millions */
return en_exp_number(numstring+i);
else
return val_append(p,cons_val(string_val("million"),
en_exp_number(numstring+i)));
}
else if (num_digits < 13)
{ /* If there are pedantic brits out there, tough!, 10^9 is a billion */
for (i=0; i < num_digits-9; i++)
part[i] = numstring[i];
part[i]='\0';
p = en_exp_number(part);
if (p == 0) /* no billions */
return en_exp_number(numstring+i);
else
return val_append(p,cons_val(string_val("billion"),
en_exp_number(numstring+i)));
}
else /* Way too many digits here, to be a number */
{
return en_exp_digits(numstring);
}
}
cst_val *en_exp_ordinal(const char *rawnumstring)
{
/* return ordinal for digit string */
cst_val *card, *o;
const cst_val *t;
const char *l;
const char *ord;
char *numstring;
int i,j;
numstring = cst_strdup(rawnumstring);
for (j=i=0; i < cst_strlen(rawnumstring); i++)
if (rawnumstring[i] != ',')
{
numstring[j] = rawnumstring[i];
j++;
}
numstring[j] = '\0';
card = val_reverse(en_exp_number(numstring));
cst_free(numstring);
l = val_string(val_car(card));
ord = 0;
for (i=0; i<10; i++)
if (cst_streq(l,digit2num[i]))
ord = ord2num[i];
if (!ord)
for (i=0; i<10; i++)
if (cst_streq(l,digit2teen[i]))
ord = ord2teen[i];
if (!ord)
for (i=0; i<10; i++)
if (cst_streq(l,digit2enty[i]))
ord = ord2enty[i];
if (cst_streq(l,"hundred"))
ord = "hundredth";
if (cst_streq(l,"thousand"))
ord = "thousandth";
if (cst_streq(l,"billion"))
ord = "billtionth";
if (!ord) /* dunno, so don't convert anything */
return card;
o = cons_val(string_val(ord),0);
for (t=val_cdr(card); t; t=val_cdr(t))
o = cons_val(val_car(t),o);
delete_val(card);
return o;
}
cst_val *en_exp_id(const char *numstring)
{
/* Expand numstring as pairs as in years or ids */
char aaa[3];
if ((cst_strlen(numstring) == 4) &&
(numstring[2] == '0') &&
(numstring[3] == '0'))
{
if (numstring[1] == '0')
return en_exp_number(numstring); /* 2000, 3000 */
else
{
aaa[0] = numstring[0];
aaa[1] = numstring[1];
aaa[2] = '\0';
return val_append(en_exp_number(aaa),
cons_val(string_val("hundred"),0));
}
}
else if ((cst_strlen(numstring) == 3) &&
(numstring[0] != '0') &&
(numstring[1] == '0') &&
(numstring[2] == '0'))
{
return cons_val(string_val(digit2num[numstring[0]-'0']),
cons_val(string_val("hundred"),0));
}
else if ((cst_strlen(numstring) == 2) && (numstring[0] == '0')
&& (numstring[1] == '0'))
return cons_val(string_val("zero"),
cons_val(string_val("zero"),NULL));
else if ((cst_strlen(numstring) == 2) && (numstring[0] == '0'))
return cons_val(string_val("oh"),
en_exp_digits(&numstring[1]));
else if (((cst_strlen(numstring) == 4) &&
((numstring[1] == '0'))) ||
(cst_strlen(numstring) < 3))
return en_exp_number(numstring);
else if (cst_strlen(numstring)%2 == 1)
{
return cons_val(string_val(digit2num[numstring[0]-'0']),
en_exp_id(&numstring[1]));
}
else
{
aaa[0] = numstring[0];
aaa[1] = numstring[1];
aaa[2] = '\0';
return val_append(en_exp_number(aaa),en_exp_id(&numstring[2]));
}
}
cst_val *en_exp_real(const char *numstring)
{
char *aaa, *p;
cst_val *r;
if (numstring && (numstring[0] == '-'))
r = cons_val(string_val("minus"),
en_exp_real(&numstring[1]));
else if (numstring && (numstring[0] == '+'))
r = cons_val(string_val("plus"),
en_exp_real(&numstring[1]));
else if (((p=strchr(numstring,'e')) != 0) ||
((p=strchr(numstring,'E')) != 0))
{
aaa = cst_strdup(numstring);
aaa[cst_strlen(numstring)-cst_strlen(p)] = '\0';
r = val_append(en_exp_real(aaa),
cons_val(string_val("e"),
en_exp_real(p+1)));
cst_free(aaa);
}
else if ((p=strchr(numstring,'.')) != 0)
{
aaa = cst_strdup(numstring);
aaa[cst_strlen(numstring)-cst_strlen(p)] = '\0';
r = val_append(en_exp_number(aaa),
cons_val(string_val("point"),
en_exp_digits(p+1)));
cst_free(aaa);
}
else
r = en_exp_number(numstring); /* I don't think you can get here */
return r;
}
cst_val *en_exp_digits(const char *numstring)
{
/* Expand given token to list of words pronouncing it as digits */
cst_val *d = 0;
const char *p;
for (p=numstring; *p; p++)
{
if ((*p >= '0') && (*p <= '9'))
d = cons_val(string_val(digit2num[*p-'0']),d);
else
d = cons_val(string_val("umpty"),d);
}
return val_reverse(d);
}
cst_val *en_exp_letters(const char *lets)
{
/* returns these as list of single char symbols */
char *aaa;
cst_val *r;
int i;
aaa = cst_alloc(char,2);
aaa[1] = '\0';
for (r=0,i=0; lets[i] != '\0'; i++)
{
aaa[0] = lets[i];
if (isupper((int)aaa[0]))
aaa[0] = tolower((int)aaa[0]);
if (strchr("0123456789",aaa[0]))
r = cons_val(string_val(digit2num[aaa[0]-'0']),r);
else if (cst_streq(aaa,"a"))
r = cons_val(string_val("_a"),r);
else
r = cons_val(string_val(aaa),r);
}
cst_free(aaa);
return val_reverse(r);
}
int en_exp_roman(const char *roman)
{
int val;
const char *p;
val = 0;
for (p=roman; *p != 0; p++)
{
if (*p == 'X')
val += 10;
else if (*p == 'V')
val += 5;
else if (*p == 'I')
{
if (p[1] == 'V')
{
val += 4;
p++;
}
else if (p[1] == 'X')
{
val += 9;
p++;
}
else
val += 1;
}
}
return val;
}
@@ -0,0 +1,519 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Feature functions used by various cart trees etc */
/* These have been create as needed, and as some of the trees are */
/* from University of Edinburgh's Festival system their names and */
/* semantics follow them */
/*************************************************************************/
/* ----------------------------------------------------------------- */
/* The English TTS System "Flite+hts_engine" */
/* developed by HTS Working Group */
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2005-2008 Tokyo Institute of Technology */
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* - Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* - Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials provided */
/* with the distribution. */
/* - Neither the name of the HTS working group nor the names of its */
/* contributors may be used to endorse or promote products derived */
/* from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */
/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */
/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
/* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */
/* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */
/* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* ----------------------------------------------------------------- */
#include "cst_hrg.h"
#include "cst_phoneset.h"
#include "cst_regex.h"
#include "cst_ffeatures.h"
#include "us_ffeatures.h"
static const cst_val *gpos(const cst_item *word);
DEF_STATIC_CONST_VAL_STRING(val_string_numeric,"numeric");
DEF_STATIC_CONST_VAL_STRING(val_string_number,"number");
DEF_STATIC_CONST_VAL_STRING(val_string_month,"month");
DEF_STATIC_CONST_VAL_STRING(val_string_day,"day");
DEF_STATIC_CONST_VAL_STRING(val_string_other,"_other_");
DEF_STATIC_CONST_VAL_STRING(val_string_a,"a");
DEF_STATIC_CONST_VAL_STRING(val_string_flight,"flight");
DEF_STATIC_CONST_VAL_STRING(val_string_to,"to");
DEF_STATIC_CONST_VAL_STRING(val_string_content,"content");
static const cst_val *gpos(const cst_item *word)
{
/* Guess at part of speech (function/content) */
const char *w;
int s,t;
w = item_feat_string(word,"name");
for (s=0; us_gpos[s]; s++)
{
for (t=1; us_gpos[s][t]; t++)
if (cst_streq(w,val_string(us_gpos[s][t])))
return us_gpos[s][0];
}
return (cst_val *)&val_string_content;
}
static const cst_val *num_digits(const cst_item *token)
{
const char *name = item_feat_string(token,"name");
return val_int_n(cst_strlen(name));
}
static const cst_val *month_range(const cst_item *token)
{
int v = item_feat_int(token,"name");
if ((v > 0) && ( v < 32))
return VAL_STRING_1;
else
return VAL_STRING_0;
}
static const cst_val* token_pos_guess(const cst_item* token)
{
const char* name = item_feat_string(token, "name");
char* dc = cst_downcase(name);
const cst_val* r;
if (cst_regex_match(cst_rx_digits, dc))
r = (cst_val*)&val_string_numeric;
else if ((cst_regex_match(cst_rx_double, dc)) ||
(cst_regex_match(cst_rx_double, dc)))
r = (cst_val*)&val_string_number;
else if (cst_streq(dc, "jan") ||
cst_streq(dc, "january") ||
cst_streq(dc, "feb") ||
cst_streq(dc, "february") ||
cst_streq(dc, "mar") ||
cst_streq(dc, "march") ||
cst_streq(dc, "apr") ||
cst_streq(dc, "april") ||
cst_streq(dc, "may") ||
cst_streq(dc, "jun") ||
cst_streq(dc, "june") ||
cst_streq(dc, "jul") ||
cst_streq(dc, "july") ||
cst_streq(dc, "aug") ||
cst_streq(dc, "august") ||
cst_streq(dc, "sep") ||
cst_streq(dc, "sept") ||
cst_streq(dc, "september") ||
cst_streq(dc, "oct") ||
cst_streq(dc, "october") ||
cst_streq(dc, "nov") ||
cst_streq(dc, "november") ||
cst_streq(dc, "dec") ||
cst_streq(dc, "december"))
r = (cst_val*)&val_string_month;
else if (cst_streq(dc, "sun") ||
cst_streq(dc, "sunday") ||
cst_streq(dc, "mon") ||
cst_streq(dc, "monday") ||
cst_streq(dc, "tue") ||
cst_streq(dc, "tues") ||
cst_streq(dc, "tuesday") ||
cst_streq(dc, "wed") ||
cst_streq(dc, "wednesday") ||
cst_streq(dc, "thu") ||
cst_streq(dc, "thurs") ||
cst_streq(dc, "thursday") ||
cst_streq(dc, "fri") ||
cst_streq(dc, "friday") ||
cst_streq(dc, "sat") ||
cst_streq(dc, "saturday"))
r = (cst_val*)&val_string_day;
/* ignoring the "token_most_common" condition, does get used */
else if (cst_streq(dc, "a"))
r = (cst_val*)&val_string_a;
else if (cst_streq(dc, "flight"))
r = (cst_val*)&val_string_flight;
else if (cst_streq(dc, "to"))
r = (cst_val*)&val_string_to;
else
r = (cst_val*)&val_string_other;
cst_free(dc);
return r;
}
#ifdef FLITE_PLUS_HTS_ENGINE
const cst_val *accented(const cst_item *p); /* defined in cst_ffeatures.c */
int item_after_length(const cst_item *n){
int i = 0;
if(n == NULL) return 0;
for(;n;n=n->n,i++);
return i;
}
const cst_item *item_first(const cst_item *n){
if(n == 0) return 0;
for(;n->p != 0;n=n->p);
return n;
}
/* 11 12 13 53 54 */
static const cst_val *syl_numphones(const cst_item *syl){
return val_string_n(item_after_length(item_daughter(item_as(syl,"SylStructure"))));
}
/* 14 */
static const cst_val *pos_in_word(const cst_item *syl){
const cst_item *ss,*p;
int c = 0;
ss = item_as(syl,"SylStructure");
for(p = item_daughter(item_parent(ss));p;p = item_next(p),c++){
if(p == ss) return val_string_n(c);
}
return val_string_n(c);
}
/* 21 by Toda-san */
static const cst_val *lisp_distance_to_p_stress(const cst_item *syl){
const cst_item *s, *fs;
int c;
s=item_as(syl,"Syllable");
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughter.R:SylStructure.daughter");
if (item_equal(s,fs)) return val_string_n(0);
s=item_prev(s);
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
s=item_prev(s),c++)
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
else return val_string_n(0);
}
/* 22 by Toda-san */
static const cst_val *lisp_distance_to_n_stress(const cst_item *syl){
const cst_item *s, *fs;
int c;
s=item_as(syl,"Syllable");
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughtern.R:SylStructure.daughtern");
if (item_equal(s,fs)) return val_string_n(0);
s=item_next(s);
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
s=item_next(s),c++)
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
if (strcmp("1", ffeature_string(s,"stress")) == 0) return val_string_n(c);
else return val_string_n(0);
}
/* 23 by Toda-san */
static const cst_val *lisp_distance_to_p_accent(const cst_item *syl){
const cst_item *s, *fs;
int c;
s=item_as(syl,"Syllable");
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughter.R:SylStructure.daughter");
if (item_equal(s,fs)) return val_string_n(0);
s=item_prev(s);
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
s=item_prev(s),c++)
if (val_int(accented(s))) return val_string_n(c);
if (val_int(accented(s))) return val_string_n(c);
else return val_string_n(0);
}
/* 24 by Toda-san */
static const cst_val *lisp_distance_to_n_accent(const cst_item *syl){
const cst_item *s, *fs;
int c;
s=item_as(syl,"Syllable");
fs = path_to_item(syl,"R:SylStructure.parent.R:Phrase.parent.daughtern.R:SylStructure.daughtern");
if (item_equal(s,fs)) return val_string_n(0);
s=item_next(s);
for (c=1; s && (!item_equal(s,fs)) && (c < CST_CONST_INT_MAX);
s=item_next(s),c++)
if (val_int(accented(s))) return val_string_n(c);
if (val_int(accented(s))) return val_string_n(c);
else return val_string_n(0);
}
/* 25 */
static char syl_vowel_str[16];
static cst_val syl_vowel_val;
static const cst_val *syl_vowel(const cst_item *syl){
/* the vowel in the syllable */
const cst_item *ss,*p;
int size;
CST_VAL_TYPE(&syl_vowel_val) = CST_VAL_TYPE_STRING;
ss = item_as(syl,"SylStructure");
for(p = item_daughter(ss),size = 0;p;p = item_next(p),size++){
if(strchr("aeiou",item_name(p)[0]) != NULL){
strcpy(syl_vowel_str,item_name(p));
CST_VAL_STRING_LVAL(&syl_vowel_val) = syl_vowel_str;
return &syl_vowel_val;
}
}
/* no vowel */
strcpy(syl_vowel_str,"novowel");
CST_VAL_STRING_LVAL(&syl_vowel_val) = syl_vowel_str;
return &syl_vowel_val;
}
/* 32 */
static const cst_val *pos_in_phrase(const cst_item *syl){
const cst_item *ss,*p;
int c = 0;
ss = item_as(syl,"Phrase");
for (p = item_first(ss);p;p=item_next(p),c++)
if(p == ss) return val_string_n(c);
return val_string_n(c);
}
/* 33 */
static const cst_val *words_out(const cst_item *syl){
const cst_item *ss,*p;
int c = 0;
ss = item_as(syl,"Phrase");
for(p = ss;p;p=item_next(p),c++);
return val_string_n(c);
}
/* 34 by Toda-san */
static const cst_val *content_words_in(const cst_item *word){
const cst_item *ss,*p,*fs;
int c;
ss = word;
fs = path_to_item(word,"R:Phrase.parent.daughter");
for (c=0, p=ss; p && (!item_equal(p,fs)) && (c < CST_CONST_INT_MAX);
p=item_prev(p))
if (cst_streq("content", ffeature_string(p,"gpos"))) c++;
return val_string_n(c); /* its used randomly as int and float */
}
/* 35 by Toda-san */
static const cst_val *content_words_out(const cst_item *word){
const cst_item *ss,*p,*fs;
int c;
ss = word;
fs = path_to_item(word,"R:Phrase.parent.daughtern");
for (c=0, p=ss; p && (!item_equal(p,fs)) && (c < CST_CONST_INT_MAX);
p=item_next(p))
if (cst_streq("content", ffeature_string(p,"gpos"))) c++;
return val_string_n(c); /* its used randomly as int and float */
}
/* 36 */
static const cst_val *lisp_distance_to_p_content(const cst_item *syl){
const cst_item *p;
int c = 0;
for(p=item_prev(item_as(syl,"Phrase"));p;p=item_prev(p)){
c++;
if(gpos(p)==(cst_val*)&val_string_content)
break;
}
return val_string_n(c);
}
/* 37 */
static const cst_val *lisp_distance_to_n_content(const cst_item *syl){
const cst_item *p;
int c = 0;
for(p=item_next(item_as(syl,"Phrase"));p;p=item_next(p)){
c++;
if (gpos(p)==(cst_val*)&val_string_content)
break;
}
return val_string_n(c);
}
/* 38 39 40 59 60 by Toda-san */
static const cst_val *lisp_num_syls_in_phrase(const cst_item *phrase){
const cst_item *sw,*fw;
int c;
sw = path_to_item(phrase,"daughter");
fw = path_to_item(phrase,"daughtern");
for (c=0; sw && (!item_equal(sw,fw)) && (c < CST_CONST_INT_MAX);
sw=item_next(sw)) c += ffeature_int(sw, "word_numsyls");
c += ffeature_int(sw, "word_numsyls");
return val_string_n(c);
}
/* 41 42 43 61 62 by Toda-san */
static const cst_val *lisp_num_words_in_phrase(const cst_item *phrase){
const cst_item *sw,*fw;
int c;
sw = path_to_item(phrase,"daughter");
fw = path_to_item(phrase,"daughtern");
for (c=1; sw && (!item_equal(sw,fw)) && (c < CST_CONST_INT_MAX);
sw=item_next(sw)) c++;
return val_string_n(c);
}
/* 46 by Toda-san */
static const cst_val *lisp_total_syls(const cst_item *phrase){
const cst_item *sp, *fp;
int c;
sp = phrase;
while (item_prev(sp) != NULL) sp = item_prev(sp);
fp = phrase;
while (item_next(fp) != NULL) fp = item_next(fp);
for (c = 0; sp && (!item_equal(sp, fp)) && (c < CST_CONST_INT_MAX);
sp = item_next(sp)) c += ffeature_int(sp, "lisp_num_syls_in_phrase");
c += ffeature_int(sp, "lisp_num_syls_in_phrase");
return val_string_n(c);
}
/* 47 by Toda-san */
static const cst_val *lisp_total_words(const cst_item *phrase){
const cst_item *sp, *fp;
int c;
sp = phrase;
while (item_prev(sp) != NULL) sp = item_prev(sp);
fp = phrase;
while (item_next(fp) != NULL) fp = item_next(fp);
for (c = 0; sp && (!item_equal(sp, fp)) && (c < CST_CONST_INT_MAX);
sp = item_next(sp)) c += ffeature_int(sp, "lisp_num_words_in_phrase");
c += ffeature_int(sp, "lisp_num_words_in_phrase");
return val_string_n(c);
}
/* 48 by Toda-san */
static const cst_val *lisp_total_phrases(const cst_item *phrase){
const cst_item *sp, *fp;
int c;
sp = phrase;
while (item_prev(sp) != NULL) sp = item_prev(sp);
fp = phrase;
while (item_next(fp) != NULL) fp = item_next(fp);
for (c = 1; sp && (!item_equal(sp, fp)) && (c < CST_CONST_INT_MAX);
sp = item_next(sp)) c++;
return val_string_n(c);
}
#endif /* FLITE_PLUS_HTS_ENGINE */
void us_ff_register(cst_features *ffunctions)
{
/* The language independent ones */
basic_ff_register(ffunctions);
ff_register(ffunctions, "gpos",gpos);
ff_register(ffunctions, "num_digits",num_digits);
ff_register(ffunctions, "month_range",month_range);
ff_register(ffunctions, "token_pos_guess",token_pos_guess);
#ifdef FLITE_PLUS_HTS_ENGINE
ff_register(ffunctions, "syl_numphones",syl_numphones); /* 11 12 13 53 54 */
ff_register(ffunctions, "pos_in_word",pos_in_word); /* 14 */
ff_register(ffunctions, "lisp_distance_to_p_stress",lisp_distance_to_p_stress); /* 21 */
ff_register(ffunctions, "lisp_distance_to_n_stress",lisp_distance_to_n_stress); /* 22 */
ff_register(ffunctions, "lisp_distance_to_p_accent",lisp_distance_to_p_accent); /* 23 */
ff_register(ffunctions, "lisp_distance_to_n_accent",lisp_distance_to_n_accent); /* 24 */
ff_register(ffunctions, "syl_vowel",syl_vowel); /* 25 */
ff_register(ffunctions, "pos_in_phrase",pos_in_phrase); /* 32 */
ff_register(ffunctions, "words_out",words_out); /* 33 */
ff_register(ffunctions, "content_words_in",content_words_in); /* 34 */
ff_register(ffunctions, "content_words_out",content_words_out); /* 35 */
ff_register(ffunctions, "lisp_distance_to_p_content",lisp_distance_to_p_content); /* 36 */
ff_register(ffunctions, "lisp_distance_to_n_content",lisp_distance_to_n_content); /* 37 */
ff_register(ffunctions, "lisp_num_syls_in_phrase",lisp_num_syls_in_phrase); /* 38 39 40 59 60 */
ff_register(ffunctions, "lisp_num_words_in_phrase",lisp_num_words_in_phrase); /* 41 42 43 61 62 */
ff_register(ffunctions, "lisp_total_syls",lisp_total_syls); /* 46 */
ff_register(ffunctions, "lisp_total_words",lisp_total_words); /* 47 */
ff_register(ffunctions, "lisp_total_phrases",lisp_total_phrases); /* 48 */
#endif /* FLITE_PLUS_HTS_ENGINE */
}
@@ -0,0 +1,49 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Feature functions used by various cart trees etc */
/* These have been create as needed, and as some of the trees are */
/* from University of Edinburgh's Festival system their names and */
/* semantics follow them */
/*************************************************************************/
#ifndef _US_FFEATURES_H
#define _US_FFEATURES_H
void us_ff_register(cst_features *ffunctions);
extern const cst_val * const * const us_gpos[];
#endif /* _US_FFEATURES_H */
+290
View File
@@ -0,0 +1,290 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Poor mans part of speech tagger */
/*************************************************************************/
#include "cst_val.h"
DEF_STATIC_CONST_VAL_STRING(gpos_in,"in");
DEF_STATIC_CONST_VAL_STRING(gpos_of,"of");
DEF_STATIC_CONST_VAL_STRING(gpos_for,"for");
DEF_STATIC_CONST_VAL_STRING(gpos_on,"on");
DEF_STATIC_CONST_VAL_STRING(gpos_that,"that");
DEF_STATIC_CONST_VAL_STRING(gpos_with,"with");
DEF_STATIC_CONST_VAL_STRING(gpos_by,"by");
DEF_STATIC_CONST_VAL_STRING(gpos_at,"at");
DEF_STATIC_CONST_VAL_STRING(gpos_from,"from");
DEF_STATIC_CONST_VAL_STRING(gpos_as,"as");
DEF_STATIC_CONST_VAL_STRING(gpos_if,"if");
DEF_STATIC_CONST_VAL_STRING(gpos_against,"against");
DEF_STATIC_CONST_VAL_STRING(gpos_about,"about");
DEF_STATIC_CONST_VAL_STRING(gpos_before,"before");
DEF_STATIC_CONST_VAL_STRING(gpos_because,"because");
DEF_STATIC_CONST_VAL_STRING(gpos_under,"under");
DEF_STATIC_CONST_VAL_STRING(gpos_after,"after");
DEF_STATIC_CONST_VAL_STRING(gpos_over,"over");
DEF_STATIC_CONST_VAL_STRING(gpos_into,"into");
DEF_STATIC_CONST_VAL_STRING(gpos_while,"while");
DEF_STATIC_CONST_VAL_STRING(gpos_without,"without");
DEF_STATIC_CONST_VAL_STRING(gpos_through,"through");
DEF_STATIC_CONST_VAL_STRING(gpos_new,"new"); /* ??? */
DEF_STATIC_CONST_VAL_STRING(gpos_between,"between");
DEF_STATIC_CONST_VAL_STRING(gpos_among,"among");
DEF_STATIC_CONST_VAL_STRING(gpos_until,"until");
DEF_STATIC_CONST_VAL_STRING(gpos_per,"per");
DEF_STATIC_CONST_VAL_STRING(gpos_up,"up");
DEF_STATIC_CONST_VAL_STRING(gpos_down,"down");
static const cst_val * const gpos_in_list[] = {
(cst_val *)&gpos_in,
(cst_val *)&gpos_of,
(cst_val *)&gpos_for,
(cst_val *)&gpos_in,
(cst_val *)&gpos_on,
(cst_val *)&gpos_that,
(cst_val *)&gpos_with,
(cst_val *)&gpos_by,
(cst_val *)&gpos_at,
(cst_val *)&gpos_from,
(cst_val *)&gpos_as,
(cst_val *)&gpos_if,
(cst_val *)&gpos_that,
(cst_val *)&gpos_against,
(cst_val *)&gpos_about,
(cst_val *)&gpos_before,
(cst_val *)&gpos_because,
(cst_val *)&gpos_under,
(cst_val *)&gpos_after,
(cst_val *)&gpos_over,
(cst_val *)&gpos_into,
(cst_val *)&gpos_while,
(cst_val *)&gpos_without,
(cst_val *)&gpos_through,
(cst_val *)&gpos_new,
(cst_val *)&gpos_between,
(cst_val *)&gpos_among,
(cst_val *)&gpos_until,
(cst_val *)&gpos_per,
(cst_val *)&gpos_up,
(cst_val *)&gpos_down,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_to,"to");
static const cst_val * const gpos_to_list[] = {
(cst_val *)&gpos_to,
(cst_val *)&gpos_to,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_det,"det");
DEF_STATIC_CONST_VAL_STRING(gpos_the,"the");
DEF_STATIC_CONST_VAL_STRING(gpos_a,"a");
DEF_STATIC_CONST_VAL_STRING(gpos_an,"an");
DEF_STATIC_CONST_VAL_STRING(gpos_some,"some");
DEF_STATIC_CONST_VAL_STRING(gpos_this,"this");
DEF_STATIC_CONST_VAL_STRING(gpos_each,"each");
DEF_STATIC_CONST_VAL_STRING(gpos_another,"another");
DEF_STATIC_CONST_VAL_STRING(gpos_those,"those");
DEF_STATIC_CONST_VAL_STRING(gpos_every,"every");
DEF_STATIC_CONST_VAL_STRING(gpos_all,"all");
DEF_STATIC_CONST_VAL_STRING(gpos_any,"any");
DEF_STATIC_CONST_VAL_STRING(gpos_these,"these");
DEF_STATIC_CONST_VAL_STRING(gpos_both,"both");
DEF_STATIC_CONST_VAL_STRING(gpos_neither,"neither");
DEF_STATIC_CONST_VAL_STRING(gpos_no,"no");
DEF_STATIC_CONST_VAL_STRING(gpos_many,"many");
static const cst_val * const gpos_det_list[] = {
(cst_val *)&gpos_det,
(cst_val *)&gpos_the,
(cst_val *)&gpos_a,
(cst_val *)&gpos_an,
(cst_val *)&gpos_no,
(cst_val *)&gpos_some,
(cst_val *)&gpos_this,
(cst_val *)&gpos_each,
(cst_val *)&gpos_another,
(cst_val *)&gpos_those,
(cst_val *)&gpos_every,
(cst_val *)&gpos_all,
(cst_val *)&gpos_any,
(cst_val *)&gpos_these,
(cst_val *)&gpos_both,
(cst_val *)&gpos_neither,
(cst_val *)&gpos_no,
(cst_val *)&gpos_many,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_md,"md");
DEF_STATIC_CONST_VAL_STRING(gpos_will,"will");
DEF_STATIC_CONST_VAL_STRING(gpos_may,"may");
DEF_STATIC_CONST_VAL_STRING(gpos_would,"would");
DEF_STATIC_CONST_VAL_STRING(gpos_can,"can");
DEF_STATIC_CONST_VAL_STRING(gpos_could,"could");
DEF_STATIC_CONST_VAL_STRING(gpos_should,"should");
DEF_STATIC_CONST_VAL_STRING(gpos_must,"must");
DEF_STATIC_CONST_VAL_STRING(gpos_ought,"ought");
DEF_STATIC_CONST_VAL_STRING(gpos_might,"might");
static const cst_val * const gpos_md_list[] = {
(cst_val *)&gpos_md,
(cst_val *)&gpos_will,
(cst_val *)&gpos_may,
(cst_val *)&gpos_would,
(cst_val *)&gpos_can,
(cst_val *)&gpos_could,
(cst_val *)&gpos_should,
(cst_val *)&gpos_must,
(cst_val *)&gpos_ought,
(cst_val *)&gpos_might,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_cc,"cc");
DEF_STATIC_CONST_VAL_STRING(gpos_and,"and");
DEF_STATIC_CONST_VAL_STRING(gpos_but,"but");
DEF_STATIC_CONST_VAL_STRING(gpos_or,"or");
DEF_STATIC_CONST_VAL_STRING(gpos_plus,"plus");
DEF_STATIC_CONST_VAL_STRING(gpos_yet,"yet");
DEF_STATIC_CONST_VAL_STRING(gpos_nor,"nor");
static const cst_val * const gpos_cc_list[] = {
(cst_val *)&gpos_cc,
(cst_val *)&gpos_and,
(cst_val *)&gpos_but,
(cst_val *)&gpos_or,
(cst_val *)&gpos_plus,
(cst_val *)&gpos_yet,
(cst_val *)&gpos_nor,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_wp,"wp");
DEF_STATIC_CONST_VAL_STRING(gpos_who,"who");
DEF_STATIC_CONST_VAL_STRING(gpos_what,"what");
DEF_STATIC_CONST_VAL_STRING(gpos_where,"where");
DEF_STATIC_CONST_VAL_STRING(gpos_how,"how");
DEF_STATIC_CONST_VAL_STRING(gpos_when,"when");
static const cst_val * const gpos_wp_list[] = {
(cst_val *)&gpos_wp,
(cst_val *)&gpos_who,
(cst_val *)&gpos_what,
(cst_val *)&gpos_where,
(cst_val *)&gpos_how,
(cst_val *)&gpos_when,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_pps,"pps");
DEF_STATIC_CONST_VAL_STRING(gpos_her,"her");
DEF_STATIC_CONST_VAL_STRING(gpos_his,"his");
DEF_STATIC_CONST_VAL_STRING(gpos_their,"their");
DEF_STATIC_CONST_VAL_STRING(gpos_its,"its");
DEF_STATIC_CONST_VAL_STRING(gpos_our,"our");
DEF_STATIC_CONST_VAL_STRING(gpos_mine,"mine");
static const cst_val * const gpos_pps_list[] = {
(cst_val *)&gpos_pps,
(cst_val *)&gpos_her,
(cst_val *)&gpos_his,
(cst_val *)&gpos_their,
(cst_val *)&gpos_its,
(cst_val *)&gpos_our,
(cst_val *)&gpos_mine,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_aux,"aux");
DEF_STATIC_CONST_VAL_STRING(gpos_is,"is");
DEF_STATIC_CONST_VAL_STRING(gpos_am,"am");
DEF_STATIC_CONST_VAL_STRING(gpos_are,"are");
DEF_STATIC_CONST_VAL_STRING(gpos_was,"was");
DEF_STATIC_CONST_VAL_STRING(gpos_were,"were");
DEF_STATIC_CONST_VAL_STRING(gpos_has,"has");
DEF_STATIC_CONST_VAL_STRING(gpos_have,"have");
DEF_STATIC_CONST_VAL_STRING(gpos_had,"had");
DEF_STATIC_CONST_VAL_STRING(gpos_be,"be");
static const cst_val * const gpos_aux_list[] = {
(cst_val *)&gpos_aux,
(cst_val *)&gpos_is,
(cst_val *)&gpos_am,
(cst_val *)&gpos_are,
(cst_val *)&gpos_was,
(cst_val *)&gpos_were,
(cst_val *)&gpos_has,
(cst_val *)&gpos_have,
(cst_val *)&gpos_had,
(cst_val *)&gpos_be,
0 };
DEF_STATIC_CONST_VAL_STRING(gpos_punc,"punc");
DEF_STATIC_CONST_VAL_STRING(gpos_dot,".");
DEF_STATIC_CONST_VAL_STRING(gpos_comma,",");
DEF_STATIC_CONST_VAL_STRING(gpos_colon,":");
DEF_STATIC_CONST_VAL_STRING(gpos_semicolon,";");
DEF_STATIC_CONST_VAL_STRING(gpos_dquote,"\"");
DEF_STATIC_CONST_VAL_STRING(gpos_squote,"'");
DEF_STATIC_CONST_VAL_STRING(gpos_leftparen,"(");
DEF_STATIC_CONST_VAL_STRING(gpos_qmark,"?");
DEF_STATIC_CONST_VAL_STRING(gpos_rightparen,")");
DEF_STATIC_CONST_VAL_STRING(gpos_emark,"!");
static const cst_val * const gpos_punc_list[] = {
(cst_val *)&gpos_punc,
(cst_val *)&gpos_dot,
(cst_val *)&gpos_comma,
(cst_val *)&gpos_colon,
(cst_val *)&gpos_semicolon,
(cst_val *)&gpos_dquote,
(cst_val *)&gpos_squote,
(cst_val *)&gpos_leftparen,
(cst_val *)&gpos_qmark,
(cst_val *)&gpos_rightparen,
(cst_val *)&gpos_emark,
0 };
const cst_val * const * const us_gpos[] = {
gpos_in_list,
gpos_to_list,
gpos_det_list,
gpos_md_list,
gpos_cc_list,
gpos_wp_list,
gpos_pps_list,
gpos_aux_list,
gpos_punc_list,
0 };
@@ -0,0 +1,234 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the accent model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_accent_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart trees for us_int_accent */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_int_accent_cart.h"
extern const cst_cart us_int_accent_cart;
static const cst_cart_node us_int_accent_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_NO_0000, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0002, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0004, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0006, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0008, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0010, (cst_val *)&val_0005},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0012, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0014, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0016, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0018, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0020, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0022, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0024, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0026, (cst_val *)&val_0011},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0028, (cst_val *)&val_0012},
{ 9, CST_CART_OP_IS, CTNODE_NO_0029, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0032, (cst_val *)&val_0013},
{ 11, CST_CART_OP_IS, CTNODE_NO_0033, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0035, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0037, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0039, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0041, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0043, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0046, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0048, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0050, (cst_val *)&val_0012},
{ 7, CST_CART_OP_IS, CTNODE_NO_0051, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0054, (cst_val *)&val_0015},
{ 14, CST_CART_OP_IS, CTNODE_NO_0055, (cst_val *)&val_0010},
{ 7, CST_CART_OP_IS, CTNODE_NO_0056, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0058, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0060, (cst_val *)&val_0014},
{ 12, CST_CART_OP_IS, CTNODE_NO_0061, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 16, CST_CART_OP_IS, CTNODE_NO_0065, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0068, (cst_val *)&val_0010},
{ 9, CST_CART_OP_IS, CTNODE_NO_0069, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0072, (cst_val *)&val_0000},
{ 3, CST_CART_OP_IS, CTNODE_NO_0073, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0075, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0077, (cst_val *)&val_0010},
{ 10, CST_CART_OP_IS, CTNODE_NO_0078, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0082, (cst_val *)&val_0013},
{ 17, CST_CART_OP_IS, CTNODE_NO_0083, (cst_val *)&val_0010},
{ 10, CST_CART_OP_IS, CTNODE_NO_0084, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0088, (cst_val *)&val_0017},
{ 7, CST_CART_OP_IS, CTNODE_NO_0089, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0092, (cst_val *)&val_0006},
{ 15, CST_CART_OP_IS, CTNODE_NO_0093, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0095, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0097, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0099, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0102, (cst_val *)&val_0015},
{ 8, CST_CART_OP_IS, CTNODE_NO_0103, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0105, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0108, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0110, (cst_val *)&val_0012},
{ 10, CST_CART_OP_IS, CTNODE_NO_0111, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0114, (cst_val *)&val_0019},
{ 14, CST_CART_OP_IS, CTNODE_NO_0115, (cst_val *)&val_0010},
{ 13, CST_CART_OP_IS, CTNODE_NO_0116, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0120, (cst_val *)&val_0005},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 17, CST_CART_OP_IS, CTNODE_NO_0122, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0124, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0126, (cst_val *)&val_0010},
{ 16, CST_CART_OP_IS, CTNODE_NO_0127, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0129, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0131, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0133, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0136, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0016 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0138, (cst_val *)&val_0020},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0140, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 15, CST_CART_OP_IS, CTNODE_NO_0142, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0018 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0144, (cst_val *)&val_0010},
{ 15, CST_CART_OP_IS, CTNODE_NO_0145, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_int_accent_feat_table[] = {
"R:SylStructure.parent.R:Token.parent.EMPH",
"n.R:SylStructure.parent.R:Token.parent.EMPH",
"p.R:SylStructure.parent.R:Token.parent.EMPH",
"ssyl_in",
"R:SylStructure.parent.gpos",
"ssyl_out",
"stress",
"R:SylStructure.parent.R:Word.p.gpos",
"p.syl_break",
"syl_break",
"p.p.syl_break",
"R:SylStructure.parent.R:Word.p.p.gpos",
"syl_out",
"R:SylStructure.parent.R:Word.n.gpos",
"n.stress",
"syl_in",
"n.syl_break",
"n.n.syl_break",
NULL };
const cst_cart us_int_accent_cart = {
us_int_accent_cart_nodes,
us_int_accent_feat_table
};
@@ -0,0 +1,144 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the accent model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_accent_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart tree for us_int_accent */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_STRING(val_0000,"1");
DEF_STATIC_CONST_VAL_STRING(val_0001,"H*");
#define CTNODE_NO_0000 2
DEF_STATIC_CONST_VAL_STRING(val_0002,"NONE");
#define CTNODE_NO_0002 4
#define CTNODE_NO_0004 6
DEF_STATIC_CONST_VAL_STRING(val_0003,"10");
#define CTNODE_NO_0006 8
DEF_STATIC_CONST_VAL_STRING(val_0004,"to");
#define CTNODE_NO_0008 10
DEF_STATIC_CONST_VAL_STRING(val_0005,"cc");
#define CTNODE_NO_0010 12
#define CTNODE_NO_0012 14
DEF_STATIC_CONST_VAL_STRING(val_0006,"in");
#define CTNODE_NO_0014 16
DEF_STATIC_CONST_VAL_STRING(val_0007,"wp");
#define CTNODE_NO_0016 18
DEF_STATIC_CONST_VAL_STRING(val_0008,"aux");
#define CTNODE_NO_0018 20
DEF_STATIC_CONST_VAL_STRING(val_0009,"det");
#define CTNODE_NO_0020 22
DEF_STATIC_CONST_VAL_STRING(val_0010,"0");
#define CTNODE_NO_0022 24
#define CTNODE_NO_0024 26
DEF_STATIC_CONST_VAL_STRING(val_0011,"md");
#define CTNODE_NO_0026 28
DEF_STATIC_CONST_VAL_STRING(val_0012,"3");
#define CTNODE_NO_0029 31
#define CTNODE_NO_0028 32
DEF_STATIC_CONST_VAL_STRING(val_0013,"4");
#define CTNODE_NO_0033 35
#define CTNODE_NO_0035 37
#define CTNODE_NO_0037 39
#define CTNODE_NO_0039 41
#define CTNODE_NO_0041 43
#define CTNODE_NO_0043 45
#define CTNODE_NO_0032 46
#define CTNODE_NO_0046 48
#define CTNODE_NO_0048 50
DEF_STATIC_CONST_VAL_STRING(val_0014,"content");
#define CTNODE_NO_0051 53
#define CTNODE_NO_0050 54
DEF_STATIC_CONST_VAL_STRING(val_0015,"2");
#define CTNODE_NO_0056 58
#define CTNODE_NO_0058 60
#define CTNODE_NO_0061 63
#define CTNODE_NO_0060 64
#define CTNODE_NO_0055 65
#define CTNODE_NO_0065 67
#define CTNODE_NO_0054 68
DEF_STATIC_CONST_VAL_STRING(val_0016,"L+H*");
#define CTNODE_NO_0069 71
#define CTNODE_NO_0068 72
#define CTNODE_NO_0073 75
#define CTNODE_NO_0075 77
#define CTNODE_NO_0078 80
#define CTNODE_NO_0077 81
#define CTNODE_NO_0072 82
#define CTNODE_NO_0084 86
#define CTNODE_NO_0083 87
#define CTNODE_NO_0082 88
DEF_STATIC_CONST_VAL_STRING(val_0017,"5");
#define CTNODE_NO_0089 91
#define CTNODE_NO_0088 92
#define CTNODE_NO_0093 95
#define CTNODE_NO_0095 97
#define CTNODE_NO_0097 99
#define CTNODE_NO_0099 101
DEF_STATIC_CONST_VAL_STRING(val_0018,"!H*");
#define CTNODE_NO_0092 102
#define CTNODE_NO_0103 105
#define CTNODE_NO_0105 107
#define CTNODE_NO_0102 108
#define CTNODE_NO_0108 110
#define CTNODE_NO_0111 113
#define CTNODE_NO_0110 114
DEF_STATIC_CONST_VAL_STRING(val_0019,"7");
#define CTNODE_NO_0116 118
#define CTNODE_NO_0115 119
#define CTNODE_NO_0114 120
#define CTNODE_NO_0120 122
#define CTNODE_NO_0122 124
#define CTNODE_NO_0124 126
#define CTNODE_NO_0127 129
#define CTNODE_NO_0129 131
#define CTNODE_NO_0131 133
#define CTNODE_NO_0133 135
#define CTNODE_NO_0126 136
#define CTNODE_NO_0136 138
DEF_STATIC_CONST_VAL_STRING(val_0020,"6");
#define CTNODE_NO_0138 140
#define CTNODE_NO_0140 142
#define CTNODE_NO_0142 144
#define CTNODE_NO_0145 147
#define CTNODE_NO_0144 148
@@ -0,0 +1,177 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the tone model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_tone_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart trees for us_int_tone */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_int_tone_cart.h"
extern const cst_cart us_int_tone_cart;
static const cst_cart_node us_int_tone_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_NO_0000, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0002, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0004, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0006, (cst_val *)&val_0005},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 3, CST_CART_OP_IS, CTNODE_NO_0008, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0010, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0012, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0014, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0016, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0018, (cst_val *)&val_0006},
{ 6, CST_CART_OP_IS, CTNODE_NO_0019, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0021, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0023, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0025, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0027, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0029, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0031, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0033, (cst_val *)&val_0016},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0035, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0037, (cst_val *)&val_0010},
{ 6, CST_CART_OP_IS, CTNODE_NO_0038, (cst_val *)&val_0009},
{ 4, CST_CART_OP_IS, CTNODE_NO_0039, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 10, CST_CART_OP_IS, CTNODE_NO_0042, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0014 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0011 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0046, (cst_val *)&val_0017},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0048, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_NO_0050, (cst_val *)&val_0018},
{ 11, CST_CART_OP_IS, CTNODE_NO_0051, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 12, CST_CART_OP_IS, CTNODE_NO_0053, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0055, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0057, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0059, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0061, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 13, CST_CART_OP_IS, CTNODE_NO_0063, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0065, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0067, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0069, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0071, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 7, CST_CART_OP_IS, CTNODE_NO_0073, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0075, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 8, CST_CART_OP_IS, CTNODE_NO_0077, (cst_val *)&val_0016},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 11, CST_CART_OP_IS, CTNODE_NO_0079, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 9, CST_CART_OP_IS, CTNODE_NO_0081, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 14, CST_CART_OP_IS, CTNODE_NO_0083, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 2, CST_CART_OP_IS, CTNODE_NO_0085, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 4, CST_CART_OP_IS, CTNODE_NO_0087, (cst_val *)&val_0010},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 6, CST_CART_OP_IS, CTNODE_NO_0089, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 5, CST_CART_OP_IS, CTNODE_NO_0091, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0020 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_int_tone_feat_table[] = {
"lisp_syl_yn_question",
"R:SylStructure.parent.gpos",
"ssyl_in",
"p.old_syl_break",
"n.old_syl_break",
"old_syl_break",
"R:SylStructure.parent.R:Word.n.gpos",
"R:SylStructure.parent.R:Word.p.gpos",
"syl_in",
"sub_phrases",
"n.stress",
"R:SylStructure.parent.R:Word.n.n.gpos",
"p.p.old_syl_break",
"n.n.old_syl_break",
"R:SylStructure.parent.R:Word.p.p.gpos",
NULL };
const cst_cart us_int_tone_cart = {
us_int_tone_cart_nodes,
us_int_tone_feat_table
};
@@ -0,0 +1,117 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* Derived directly from the tone model cart tree in University of */
/* Edinburgh's Festival Speech Synthesis Systems */
/* file: festival/lib/tobi.scm:f2b_int_tone_cart_tree */
/* which was in turn was trained from Boston University FM Radio Data */
/* Corpus */
/* */
/*************************************************************************/
/*******************************************************/
/** Autogenerated cart tree for us_int_tone */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_STRING(val_0000,"1");
DEF_STATIC_CONST_VAL_STRING(val_0001,"H-H%");
#define CTNODE_NO_0000 2
DEF_STATIC_CONST_VAL_STRING(val_0002,"cc");
DEF_STATIC_CONST_VAL_STRING(val_0003,"NONE");
#define CTNODE_NO_0002 4
DEF_STATIC_CONST_VAL_STRING(val_0004,"10");
#define CTNODE_NO_0004 6
DEF_STATIC_CONST_VAL_STRING(val_0005,"md");
#define CTNODE_NO_0006 8
DEF_STATIC_CONST_VAL_STRING(val_0006,"4");
#define CTNODE_NO_0008 10
DEF_STATIC_CONST_VAL_STRING(val_0007,"det");
#define CTNODE_NO_0010 12
DEF_STATIC_CONST_VAL_STRING(val_0008,"3");
#define CTNODE_NO_0012 14
#define CTNODE_NO_0014 16
DEF_STATIC_CONST_VAL_STRING(val_0009,"in");
#define CTNODE_NO_0016 18
DEF_STATIC_CONST_VAL_STRING(val_0010,"0");
DEF_STATIC_CONST_VAL_STRING(val_0011,"L-L%");
#define CTNODE_NO_0019 21
DEF_STATIC_CONST_VAL_STRING(val_0012,"aux");
#define CTNODE_NO_0021 23
#define CTNODE_NO_0023 25
#define CTNODE_NO_0025 27
DEF_STATIC_CONST_VAL_STRING(val_0013,"6");
#define CTNODE_NO_0027 29
DEF_STATIC_CONST_VAL_STRING(val_0014,"L-H%");
#define CTNODE_NO_0029 31
DEF_STATIC_CONST_VAL_STRING(val_0015,"5");
#define CTNODE_NO_0031 33
DEF_STATIC_CONST_VAL_STRING(val_0016,"2");
#define CTNODE_NO_0033 35
#define CTNODE_NO_0035 37
#define CTNODE_NO_0039 41
#define CTNODE_NO_0038 42
#define CTNODE_NO_0042 44
#define CTNODE_NO_0037 45
#define CTNODE_NO_0018 46
DEF_STATIC_CONST_VAL_STRING(val_0017,"pps");
#define CTNODE_NO_0046 48
#define CTNODE_NO_0048 50
DEF_STATIC_CONST_VAL_STRING(val_0018,"content");
#define CTNODE_NO_0051 53
#define CTNODE_NO_0053 55
#define CTNODE_NO_0055 57
#define CTNODE_NO_0057 59
#define CTNODE_NO_0059 61
#define CTNODE_NO_0061 63
#define CTNODE_NO_0063 65
#define CTNODE_NO_0065 67
#define CTNODE_NO_0067 69
DEF_STATIC_CONST_VAL_STRING(val_0019,"to");
#define CTNODE_NO_0069 71
#define CTNODE_NO_0071 73
#define CTNODE_NO_0073 75
#define CTNODE_NO_0075 77
#define CTNODE_NO_0077 79
#define CTNODE_NO_0079 81
#define CTNODE_NO_0081 83
#define CTNODE_NO_0083 85
#define CTNODE_NO_0085 87
#define CTNODE_NO_0087 89
#define CTNODE_NO_0089 91
DEF_STATIC_CONST_VAL_STRING(val_0020,"H-");
#define CTNODE_NO_0091 93
#define CTNODE_NO_0050 94
@@ -0,0 +1,127 @@
/*******************************************************/
/** Autogenerated cart trees for us_nums */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_nums_cart.h"
extern const cst_cart us_nums_cart;
static const cst_cart_node us_nums_cart_nodes[] = {
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0000, (cst_val *)&val_0000},
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0001, (cst_val *)&val_0001},
{ 2, CST_CART_OP_IS, CTNODE_us_nums_NO_0002, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0004 },
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0005, (cst_val *)&val_0001},
{ 2, CST_CART_OP_IS, CTNODE_us_nums_NO_0006, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0004 },
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0009, (cst_val *)&val_0006},
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0010, (cst_val *)&val_0007},
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0011, (cst_val *)&val_0006},
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0012, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0016, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0019, (cst_val *)&val_0007},
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0020, (cst_val *)&val_0006},
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0021, (cst_val *)&val_0008},
{ 2, CST_CART_OP_IS, CTNODE_us_nums_NO_0022, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0027, (cst_val *)&val_0010},
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0028, (cst_val *)&val_0011},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0030, (cst_val *)&val_0008},
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0031, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0035, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0037, (cst_val *)&val_0008},
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0038, (cst_val *)&val_0008},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0039, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0043, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0045, (cst_val *)&val_0015},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0046, (cst_val *)&val_0016},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0049, (cst_val *)&val_0017},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0051, (cst_val *)&val_0018},
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0052, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0056, (cst_val *)&val_0006},
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0057, (cst_val *)&val_0001},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0059, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 5, CST_CART_OP_IS, CTNODE_us_nums_NO_0062, (cst_val *)&val_0006},
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0063, (cst_val *)&val_0001},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0065, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0067, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0070, (cst_val *)&val_0019},
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0071, (cst_val *)&val_0020},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0072, (cst_val *)&val_0021},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0073, (cst_val *)&val_0022},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0077, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 3, CST_CART_OP_IS, CTNODE_us_nums_NO_0080, (cst_val *)&val_0023},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 1, CST_CART_OP_IS, CTNODE_us_nums_NO_0082, (cst_val *)&val_0008},
{ 4, CST_CART_OP_IS, CTNODE_us_nums_NO_0083, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0085, (cst_val *)&val_0024},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0009 },
{ 0, CST_CART_OP_LESS, CTNODE_us_nums_NO_0088, (cst_val *)&val_0025},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0089, (cst_val *)&val_0026},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0090, (cst_val *)&val_0027},
{ 6, CST_CART_OP_LESS, CTNODE_us_nums_NO_0091, (cst_val *)&val_0028},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0003 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_nums_feat_table[] = {
"num_digits",
"p.token_pos_guess",
"month_range",
"n.token_pos_guess",
"p.p.token_pos_guess",
"n.n.token_pos_guess",
"name",
NULL };
const cst_cart us_nums_cart = {
us_nums_cart_nodes,
us_nums_feat_table
};
@@ -0,0 +1,82 @@
/*******************************************************/
/** Autogenerated cart tree for us_nums */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_FLOAT(val_0000,3.800000);
DEF_STATIC_CONST_VAL_STRING(val_0001,"month");
DEF_STATIC_CONST_VAL_STRING(val_0002,"0");
DEF_STATIC_CONST_VAL_STRING(val_0003,"year");
#define CTNODE_us_nums_NO_0002 4
DEF_STATIC_CONST_VAL_STRING(val_0004,"ordinal");
#define CTNODE_us_nums_NO_0001 5
DEF_STATIC_CONST_VAL_STRING(val_0005,"cardinal");
#define CTNODE_us_nums_NO_0006 8
#define CTNODE_us_nums_NO_0005 9
DEF_STATIC_CONST_VAL_STRING(val_0006,"numeric");
DEF_STATIC_CONST_VAL_FLOAT(val_0007,2.000000);
DEF_STATIC_CONST_VAL_STRING(val_0008,"sym");
DEF_STATIC_CONST_VAL_STRING(val_0009,"digits");
#define CTNODE_us_nums_NO_0012 14
#define CTNODE_us_nums_NO_0011 15
#define CTNODE_us_nums_NO_0010 16
#define CTNODE_us_nums_NO_0016 18
#define CTNODE_us_nums_NO_0009 19
#define CTNODE_us_nums_NO_0022 24
#define CTNODE_us_nums_NO_0021 25
#define CTNODE_us_nums_NO_0020 26
#define CTNODE_us_nums_NO_0019 27
DEF_STATIC_CONST_VAL_FLOAT(val_0010,302.299988);
DEF_STATIC_CONST_VAL_STRING(val_0011,"flight");
#define CTNODE_us_nums_NO_0028 30
#define CTNODE_us_nums_NO_0031 33
#define CTNODE_us_nums_NO_0030 34
#define CTNODE_us_nums_NO_0027 35
DEF_STATIC_CONST_VAL_STRING(val_0012,"a");
#define CTNODE_us_nums_NO_0035 37
DEF_STATIC_CONST_VAL_FLOAT(val_0013,669.200012);
#define CTNODE_us_nums_NO_0039 41
#define CTNODE_us_nums_NO_0038 42
#define CTNODE_us_nums_NO_0037 43
DEF_STATIC_CONST_VAL_FLOAT(val_0014,373.200012);
#define CTNODE_us_nums_NO_0043 45
DEF_STATIC_CONST_VAL_FLOAT(val_0015,436.200012);
DEF_STATIC_CONST_VAL_FLOAT(val_0016,392.600006);
#define CTNODE_us_nums_NO_0046 48
#define CTNODE_us_nums_NO_0045 49
DEF_STATIC_CONST_VAL_FLOAT(val_0017,716.500000);
#define CTNODE_us_nums_NO_0049 51
DEF_STATIC_CONST_VAL_FLOAT(val_0018,773.599976);
DEF_STATIC_CONST_VAL_STRING(val_0019,"_other_");
#define CTNODE_us_nums_NO_0052 54
#define CTNODE_us_nums_NO_0051 55
#define CTNODE_us_nums_NO_0000 56
#define CTNODE_us_nums_NO_0057 59
#define CTNODE_us_nums_NO_0059 61
#define CTNODE_us_nums_NO_0056 62
#define CTNODE_us_nums_NO_0063 65
#define CTNODE_us_nums_NO_0065 67
#define CTNODE_us_nums_NO_0067 69
#define CTNODE_us_nums_NO_0062 70
DEF_STATIC_CONST_VAL_FLOAT(val_0020,4.400000);
DEF_STATIC_CONST_VAL_FLOAT(val_0021,2959.600098);
DEF_STATIC_CONST_VAL_FLOAT(val_0022,1773.400024);
#define CTNODE_us_nums_NO_0073 75
#define CTNODE_us_nums_NO_0072 76
#define CTNODE_us_nums_NO_0071 77
#define CTNODE_us_nums_NO_0077 79
#define CTNODE_us_nums_NO_0070 80
DEF_STATIC_CONST_VAL_STRING(val_0023,"to");
#define CTNODE_us_nums_NO_0080 82
#define CTNODE_us_nums_NO_0083 85
DEF_STATIC_CONST_VAL_FLOAT(val_0024,4.600000);
#define CTNODE_us_nums_NO_0085 87
#define CTNODE_us_nums_NO_0082 88
DEF_STATIC_CONST_VAL_FLOAT(val_0025,4.800000);
DEF_STATIC_CONST_VAL_FLOAT(val_0026,2880.000000);
DEF_STATIC_CONST_VAL_FLOAT(val_0027,1633.199951);
DEF_STATIC_CONST_VAL_FLOAT(val_0028,1306.400024);
#define CTNODE_us_nums_NO_0091 93
#define CTNODE_us_nums_NO_0090 94
#define CTNODE_us_nums_NO_0089 95
#define CTNODE_us_nums_NO_0088 96
@@ -0,0 +1,257 @@
/*************************************************************************/
/* */
/* Carnegie Mellon University and */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* Copyright (c) 1998-2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* THE UNIVERSITY OF EDINBURGH, CARNEGIE MELLON UNIVERSITY AND THE */
/* CONTRIBUTORS TO THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO */
/* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY */
/* AND FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF EDINBURGH, CARNEGIE */
/* MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF */
/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
/* */
/*******************************************************/
/** Autogenerated phoneset trees for us */
/*******************************************************/
#include "cst_string.h"
#include "cst_phoneset.h"
extern const cst_phoneset us_phoneset;
static const char * const us_featnames[] = {
"vc",
"vlng",
"vheight",
"vfront",
"vrnd",
"ctype",
"cplace",
"cvox",
NULL };
static const char * const us_phonenames[] = {
"aa",
"ae",
"ah",
"ao",
"aw",
"ax",
"axr",
"ay",
"b",
"ch",
"d",
"dh",
"dx",
"eh",
"el",
"em",
"en",
"er",
"ey",
"f",
"g",
"hh",
"hv",
"ih",
"iy",
"jh",
"k",
"l",
"m",
"n",
"nx",
"ng",
"ow",
"oy",
"p",
"r",
"s",
"sh",
"t",
"th",
"uh",
"uw",
"v",
"w",
"y",
"z",
"zh",
"pau",
"h#",
"brth",
NULL };
static const int us_fv_000[] = { 0, 1, 2, 2, 3, 4, 4, 4, -1 };
static const int us_fv_001[] = { 0, 5, 2, 6, 3, 4, 4, 4, -1 };
static const int us_fv_002[] = { 0, 5, 7, 7, 3, 4, 4, 4, -1 };
static const int us_fv_003[] = { 0, 1, 2, 2, 0, 4, 4, 4, -1 };
static const int us_fv_004[] = { 0, 8, 2, 7, 3, 4, 4, 4, -1 };
static const int us_fv_005[] = { 0, 9, 7, 7, 3, 4, 4, 4, -1 };
static const int us_fv_006[] = { 0, 9, 7, 7, 3, 10, 9, 0, -1 };
static const int us_fv_007[] = { 0, 8, 2, 7, 3, 4, 4, 4, -1 };
static const int us_fv_008[] = { 3, 4, 4, 4, 4, 5, 1, 0, -1 };
static const int us_fv_009[] = { 3, 4, 4, 4, 4, 9, 11, 3, -1 };
static const int us_fv_010[] = { 3, 4, 4, 4, 4, 5, 9, 0, -1 };
static const int us_fv_011[] = { 3, 4, 4, 4, 4, 12, 8, 0, -1 };
static const int us_fv_012[] = { 3, 9, 4, 4, 4, 5, 9, 0, -1 };
static const int us_fv_013[] = { 0, 5, 7, 6, 3, 4, 4, 4, -1 };
static const int us_fv_014[] = { 0, 5, 4, 4, 4, 1, 9, 0, -1 };
static const int us_fv_015[] = { 0, 5, 4, 4, 4, 13, 1, 0, -1 };
static const int us_fv_016[] = { 0, 5, 4, 4, 4, 13, 9, 0, -1 };
static const int us_fv_017[] = { 0, 9, 7, 7, 3, 10, 4, 4, -1 };
static const int us_fv_018[] = { 0, 8, 7, 6, 3, 4, 4, 4, -1 };
static const int us_fv_019[] = { 3, 4, 4, 4, 4, 12, 14, 3, -1 };
static const int us_fv_020[] = { 3, 4, 4, 4, 4, 5, 15, 0, -1 };
static const int us_fv_021[] = { 3, 4, 4, 4, 4, 12, 16, 3, -1 };
static const int us_fv_022[] = { 3, 4, 4, 4, 4, 12, 16, 0, -1 };
static const int us_fv_023[] = { 0, 5, 6, 6, 3, 4, 4, 4, -1 };
static const int us_fv_024[] = { 0, 1, 6, 6, 3, 4, 4, 4, -1 };
static const int us_fv_025[] = { 3, 4, 4, 4, 4, 9, 11, 0, -1 };
static const int us_fv_026[] = { 3, 4, 4, 4, 4, 5, 15, 3, -1 };
static const int us_fv_027[] = { 3, 4, 4, 4, 4, 1, 9, 0, -1 };
static const int us_fv_028[] = { 3, 4, 4, 4, 4, 13, 1, 0, -1 };
static const int us_fv_029[] = { 3, 4, 4, 4, 4, 13, 9, 0, -1 };
static const int us_fv_030[] = { 3, 4, 4, 4, 4, 13, 8, 0, -1 };
static const int us_fv_031[] = { 3, 4, 4, 4, 4, 13, 15, 0, -1 };
static const int us_fv_032[] = { 0, 8, 7, 2, 0, 4, 4, 4, -1 };
static const int us_fv_033[] = { 0, 8, 7, 2, 0, 4, 4, 4, -1 };
static const int us_fv_034[] = { 3, 4, 4, 4, 4, 5, 1, 3, -1 };
static const int us_fv_035[] = { 3, 4, 4, 4, 4, 10, 9, 0, -1 };
static const int us_fv_036[] = { 3, 4, 4, 4, 4, 12, 9, 3, -1 };
static const int us_fv_037[] = { 3, 4, 4, 4, 4, 12, 11, 3, -1 };
static const int us_fv_038[] = { 3, 4, 4, 4, 4, 5, 9, 3, -1 };
static const int us_fv_039[] = { 3, 4, 4, 4, 4, 12, 8, 3, -1 };
static const int us_fv_040[] = { 0, 5, 6, 2, 0, 4, 4, 4, -1 };
static const int us_fv_041[] = { 0, 1, 6, 2, 0, 4, 4, 4, -1 };
static const int us_fv_042[] = { 3, 4, 4, 4, 4, 12, 14, 0, -1 };
static const int us_fv_043[] = { 3, 4, 4, 4, 4, 10, 1, 0, -1 };
static const int us_fv_044[] = { 3, 4, 4, 4, 4, 10, 11, 0, -1 };
static const int us_fv_045[] = { 3, 4, 4, 4, 4, 12, 9, 0, -1 };
static const int us_fv_046[] = { 3, 4, 4, 4, 4, 12, 11, 0, -1 };
static const int us_fv_047[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
static const int us_fv_048[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
static const int us_fv_049[] = { 3, 4, 4, 4, 4, 4, 4, 3, -1 };
static const int us_fv_050[] = { 0 };
static const int * const us_fvtable[] = {
us_fv_000,
us_fv_001,
us_fv_002,
us_fv_003,
us_fv_004,
us_fv_005,
us_fv_006,
us_fv_007,
us_fv_008,
us_fv_009,
us_fv_010,
us_fv_011,
us_fv_012,
us_fv_013,
us_fv_014,
us_fv_015,
us_fv_016,
us_fv_017,
us_fv_018,
us_fv_019,
us_fv_020,
us_fv_021,
us_fv_022,
us_fv_023,
us_fv_024,
us_fv_025,
us_fv_026,
us_fv_027,
us_fv_028,
us_fv_029,
us_fv_030,
us_fv_031,
us_fv_032,
us_fv_033,
us_fv_034,
us_fv_035,
us_fv_036,
us_fv_037,
us_fv_038,
us_fv_039,
us_fv_040,
us_fv_041,
us_fv_042,
us_fv_043,
us_fv_044,
us_fv_045,
us_fv_046,
us_fv_047,
us_fv_048,
us_fv_049,
us_fv_050 };
DEF_STATIC_CONST_VAL_STRING(featval_0,"+");
DEF_STATIC_CONST_VAL_STRING(featval_1,"l");
DEF_STATIC_CONST_VAL_STRING(featval_2,"3");
DEF_STATIC_CONST_VAL_STRING(featval_3,"-");
DEF_STATIC_CONST_VAL_STRING(featval_4,"0");
DEF_STATIC_CONST_VAL_STRING(featval_5,"s");
DEF_STATIC_CONST_VAL_STRING(featval_6,"1");
DEF_STATIC_CONST_VAL_STRING(featval_7,"2");
DEF_STATIC_CONST_VAL_STRING(featval_8,"d");
DEF_STATIC_CONST_VAL_STRING(featval_9,"a");
DEF_STATIC_CONST_VAL_STRING(featval_10,"r");
DEF_STATIC_CONST_VAL_STRING(featval_11,"p");
DEF_STATIC_CONST_VAL_STRING(featval_12,"f");
DEF_STATIC_CONST_VAL_STRING(featval_13,"n");
DEF_STATIC_CONST_VAL_STRING(featval_14,"b");
DEF_STATIC_CONST_VAL_STRING(featval_15,"v");
DEF_STATIC_CONST_VAL_STRING(featval_16,"g");
static const cst_val * const us_featvals[] = {
(cst_val *)&featval_0,
(cst_val *)&featval_1,
(cst_val *)&featval_2,
(cst_val *)&featval_3,
(cst_val *)&featval_4,
(cst_val *)&featval_5,
(cst_val *)&featval_6,
(cst_val *)&featval_7,
(cst_val *)&featval_8,
(cst_val *)&featval_9,
(cst_val *)&featval_10,
(cst_val *)&featval_11,
(cst_val *)&featval_12,
(cst_val *)&featval_13,
(cst_val *)&featval_14,
(cst_val *)&featval_15,
(cst_val *)&featval_16,
NULL };
const cst_phoneset us_phoneset = {
"us",
us_featnames,
us_featvals,
us_phonenames,
"pau",
50,
us_fvtable
};
@@ -0,0 +1,44 @@
/*******************************************************/
/** Autogenerated cart trees for us_phrasing */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_phrasing_cart.h"
extern const cst_cart us_phrasing_cart;
static const cst_cart_node us_phrasing_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0000, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 1, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0002, (cst_val *)&val_0002},
{ 2, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0003, (cst_val *)&val_0003},
{ 3, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0004, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 4, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0006, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 5, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0010, (cst_val *)&val_0002},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 4, CST_CART_OP_IS, CTNODE_us_phrasing_NO_0012, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0001 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_phrasing_feat_table[] = {
"R:Token.parent.n.name",
"R:Token.n.name",
"R:Token.parent.punc",
"R:Token.parent.break",
"break",
"n.name",
NULL };
const cst_cart us_phrasing_cart = {
us_phrasing_cart_nodes,
us_phrasing_feat_table
};
@@ -0,0 +1,18 @@
/*******************************************************/
/** Autogenerated cart tree for us_phrasing */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_STRING(val_0000,"--");
DEF_STATIC_CONST_VAL_STRING(val_0001,"BB");
#define CTNODE_us_phrasing_NO_0000 2
DEF_STATIC_CONST_VAL_STRING(val_0002,"0");
DEF_STATIC_CONST_VAL_STRING(val_0003,"");
DEF_STATIC_CONST_VAL_STRING(val_0004,"1");
#define CTNODE_us_phrasing_NO_0004 6
#define CTNODE_us_phrasing_NO_0006 8
DEF_STATIC_CONST_VAL_STRING(val_0005,"NB");
#define CTNODE_us_phrasing_NO_0003 9
#define CTNODE_us_phrasing_NO_0002 10
#define CTNODE_us_phrasing_NO_0010 12
#define CTNODE_us_phrasing_NO_0012 14
@@ -0,0 +1,397 @@
/*******************************************************/
/** Autogenerated cart trees for us_pos */
/*******************************************************/
#include "cst_string.h"
#include "cst_cart.h"
#include "cst_regex.h"
#include "us_pos_cart.h"
static const cst_cart_node us_pos_cart_nodes[] = {
{ 0, CST_CART_OP_IS, CTNODE_us_pos_NO_0000, (cst_val *)&val_0000},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0001, (cst_val *)&val_0001},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0003, (cst_val *)&val_0003},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0004, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0007, (cst_val *)&val_0006},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0009, (cst_val *)&val_0007},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0010, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0013, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0015, (cst_val *)&val_0000},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0016, (cst_val *)&val_0007},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0017, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0019, (cst_val *)&val_0011},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0021, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0023, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0025, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0027, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0029, (cst_val *)&val_0016},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0031, (cst_val *)&val_0017},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0033, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0035, (cst_val *)&val_0019},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0037, (cst_val *)&val_0020},
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0038, (cst_val *)&val_0021},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0041, (cst_val *)&val_0022},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0043, (cst_val *)&val_0021},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0045, (cst_val *)&val_0023},
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0046, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0049, (cst_val *)&val_0024},
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0050, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0054, (cst_val *)&val_0004},
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0055, (cst_val *)&val_0025},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0057, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0059, (cst_val *)&val_0027},
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0060, (cst_val *)&val_0028},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0062, (cst_val *)&val_0029},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0066, (cst_val *)&val_0013},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0068, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0070, (cst_val *)&val_0030},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0072, (cst_val *)&val_0011},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0074, (cst_val *)&val_0017},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0076, (cst_val *)&val_0016},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0077, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0079, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0081, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0083, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0086, (cst_val *)&val_0031},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0088, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0090, (cst_val *)&val_0032},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0092, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0094, (cst_val *)&val_0034},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0095, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0097, (cst_val *)&val_0035},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0099, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0102, (cst_val *)&val_0036},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0104, (cst_val *)&val_0037},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0106, (cst_val *)&val_0038},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0108, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0110, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0112, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0114, (cst_val *)&val_0039},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0116, (cst_val *)&val_0040},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0118, (cst_val *)&val_0041},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0120, (cst_val *)&val_0022},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0122, (cst_val *)&val_0019},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0123, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0126, (cst_val *)&val_0042},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0128, (cst_val *)&val_0043},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0130, (cst_val *)&val_0044},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0132, (cst_val *)&val_0045},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0134, (cst_val *)&val_0046},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0136, (cst_val *)&val_0047},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0138, (cst_val *)&val_0048},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0140, (cst_val *)&val_0049},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0142, (cst_val *)&val_0023},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0144, (cst_val *)&val_0050},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0146, (cst_val *)&val_0051},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0148, (cst_val *)&val_0052},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0150, (cst_val *)&val_0053},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0151, (cst_val *)&val_0000},
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0152, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0156, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0158, (cst_val *)&val_0055},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0160, (cst_val *)&val_0056},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0162, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0164, (cst_val *)&val_0057},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0166, (cst_val *)&val_0035},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0168, (cst_val *)&val_0058},
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0169, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0172, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0174, (cst_val *)&val_0059},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0176, (cst_val *)&val_0060},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0178, (cst_val *)&val_0061},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0180, (cst_val *)&val_0062},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0182, (cst_val *)&val_0063},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0184, (cst_val *)&val_0064},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0186, (cst_val *)&val_0065},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0188, (cst_val *)&val_0000},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0189, (cst_val *)&val_0066},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0191, (cst_val *)&val_0067},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0193, (cst_val *)&val_0068},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0195, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0197, (cst_val *)&val_0069},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0199, (cst_val *)&val_0070},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0201, (cst_val *)&val_0071},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0203, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0205, (cst_val *)&val_0072},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0207, (cst_val *)&val_0073},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0209, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0211, (cst_val *)&val_0074},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0213, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0215, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0217, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0219, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0222, (cst_val *)&val_0076},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0225, (cst_val *)&val_0013},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0226, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0228, (cst_val *)&val_0077},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0230, (cst_val *)&val_0079},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0232, (cst_val *)&val_0079},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0234, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0236, (cst_val *)&val_0080},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0238, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0240, (cst_val *)&val_0004},
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0241, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 5, CST_CART_OP_IS, CTNODE_us_pos_NO_0244, (cst_val *)&val_0020},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0246, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0248, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0251, (cst_val *)&val_0079},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0252, (cst_val *)&val_0036},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0254, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0256, (cst_val *)&val_0081},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0258, (cst_val *)&val_0032},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0260, (cst_val *)&val_0003},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0262, (cst_val *)&val_0014},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0264, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0266, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0268, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0270, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0273, (cst_val *)&val_0016},
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0274, (cst_val *)&val_0025},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0277, (cst_val *)&val_0036},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0279, (cst_val *)&val_0041},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0280, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0283, (cst_val *)&val_0011},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0285, (cst_val *)&val_0075},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0287, (cst_val *)&val_0033},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0289, (cst_val *)&val_0082},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0291, (cst_val *)&val_0021},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0293, (cst_val *)&val_0055},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0295, (cst_val *)&val_0017},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0297, (cst_val *)&val_0015},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0299, (cst_val *)&val_0012},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0301, (cst_val *)&val_0014},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0302, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0304, (cst_val *)&val_0083},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0307, (cst_val *)&val_0003},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0308, (cst_val *)&val_0084},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0310, (cst_val *)&val_0085},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0312, (cst_val *)&val_0051},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0314, (cst_val *)&val_0018},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0317, (cst_val *)&val_0009},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0010 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0319, (cst_val *)&val_0032},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0321, (cst_val *)&val_0030},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0323, (cst_val *)&val_0081},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0325, (cst_val *)&val_0076},
{ 3, CST_CART_OP_IS, CTNODE_us_pos_NO_0326, (cst_val *)&val_0026},
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0327, (cst_val *)&val_0000},
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0328, (cst_val *)&val_0004},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0332, (cst_val *)&val_0075},
{ 8, CST_CART_OP_IS, CTNODE_us_pos_NO_0333, (cst_val *)&val_0021},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0335, (cst_val *)&val_0004},
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0336, (cst_val *)&val_0026},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0341, (cst_val *)&val_0086},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0078 },
{ 2, CST_CART_OP_IS, CTNODE_us_pos_NO_0343, (cst_val *)&val_0054},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0345, (cst_val *)&val_0058},
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0346, (cst_val *)&val_0087},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0348, (cst_val *)&val_0088},
{ 7, CST_CART_OP_IS, CTNODE_us_pos_NO_0349, (cst_val *)&val_0000},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 9, CST_CART_OP_IS, CTNODE_us_pos_NO_0353, (cst_val *)&val_0089},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0355, (cst_val *)&val_0042},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 4, CST_CART_OP_IS, CTNODE_us_pos_NO_0357, (cst_val *)&val_0007},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0359, (cst_val *)&val_0079},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 1, CST_CART_OP_IS, CTNODE_us_pos_NO_0361, (cst_val *)&val_0090},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 6, CST_CART_OP_IS, CTNODE_us_pos_NO_0363, (cst_val *)&val_0008},
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0005 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0002 },
{ 255, CST_CART_OP_NONE, 0, (cst_val *)&val_0091 },
{ 255, CST_CART_OP_NONE, 0, 0}};
static const char * const us_pos_feat_table[] = {
"gpos",
"name",
"p.name",
"n.gpos",
"p.gpos",
"n.n.name",
"p.p.gpos",
"n.n.gpos",
"p.p.name",
"n.name",
NULL };
const cst_cart us_pos_cart = {
us_pos_cart_nodes,
us_pos_feat_table
};
@@ -0,0 +1,280 @@
/*******************************************************/
/** Autogenerated cart tree for us_pos */
/** from . */
/*******************************************************/
DEF_STATIC_CONST_VAL_STRING(val_0000,"content");
DEF_STATIC_CONST_VAL_STRING(val_0001,"house");
DEF_STATIC_CONST_VAL_STRING(val_0002,"n");
#define CTNODE_us_pos_NO_0001 3
DEF_STATIC_CONST_VAL_STRING(val_0003,"to");
DEF_STATIC_CONST_VAL_STRING(val_0004,"_other_");
#define CTNODE_us_pos_NO_0004 6
DEF_STATIC_CONST_VAL_STRING(val_0005,"v");
#define CTNODE_us_pos_NO_0003 7
DEF_STATIC_CONST_VAL_STRING(val_0006,"does");
#define CTNODE_us_pos_NO_0007 9
DEF_STATIC_CONST_VAL_STRING(val_0007,"det");
#define CTNODE_us_pos_NO_0010 12
#define CTNODE_us_pos_NO_0009 13
DEF_STATIC_CONST_VAL_STRING(val_0008,"md");
#define CTNODE_us_pos_NO_0013 15
DEF_STATIC_CONST_VAL_STRING(val_0009,"separate");
DEF_STATIC_CONST_VAL_STRING(val_0010,"j");
#define CTNODE_us_pos_NO_0017 19
DEF_STATIC_CONST_VAL_STRING(val_0011,"overall");
#define CTNODE_us_pos_NO_0019 21
DEF_STATIC_CONST_VAL_STRING(val_0012,"perfect");
#define CTNODE_us_pos_NO_0021 23
DEF_STATIC_CONST_VAL_STRING(val_0013,"close");
#define CTNODE_us_pos_NO_0023 25
DEF_STATIC_CONST_VAL_STRING(val_0014,"present");
#define CTNODE_us_pos_NO_0025 27
DEF_STATIC_CONST_VAL_STRING(val_0015,"appropriate");
#define CTNODE_us_pos_NO_0027 29
DEF_STATIC_CONST_VAL_STRING(val_0016,"live");
#define CTNODE_us_pos_NO_0029 31
DEF_STATIC_CONST_VAL_STRING(val_0017,"moderate");
#define CTNODE_us_pos_NO_0031 33
DEF_STATIC_CONST_VAL_STRING(val_0018,"lead");
#define CTNODE_us_pos_NO_0033 35
DEF_STATIC_CONST_VAL_STRING(val_0019,"rebel");
#define CTNODE_us_pos_NO_0035 37
DEF_STATIC_CONST_VAL_STRING(val_0020,"the");
DEF_STATIC_CONST_VAL_STRING(val_0021,"of");
#define CTNODE_us_pos_NO_0038 40
#define CTNODE_us_pos_NO_0037 41
DEF_STATIC_CONST_VAL_STRING(val_0022,"elaborate");
#define CTNODE_us_pos_NO_0041 43
#define CTNODE_us_pos_NO_0043 45
DEF_STATIC_CONST_VAL_STRING(val_0023,"record");
#define CTNODE_us_pos_NO_0046 48
#define CTNODE_us_pos_NO_0045 49
DEF_STATIC_CONST_VAL_STRING(val_0024,"an");
#define CTNODE_us_pos_NO_0050 52
#define CTNODE_us_pos_NO_0049 53
#define CTNODE_us_pos_NO_0016 54
DEF_STATIC_CONST_VAL_STRING(val_0025,"punc");
#define CTNODE_us_pos_NO_0055 57
DEF_STATIC_CONST_VAL_STRING(val_0026,"in");
#define CTNODE_us_pos_NO_0057 59
DEF_STATIC_CONST_VAL_STRING(val_0027,"adv");
DEF_STATIC_CONST_VAL_STRING(val_0028,"nineteen");
#define CTNODE_us_pos_NO_0060 62
DEF_STATIC_CONST_VAL_STRING(val_0029,"six");
#define CTNODE_us_pos_NO_0062 64
#define CTNODE_us_pos_NO_0059 65
#define CTNODE_us_pos_NO_0054 66
#define CTNODE_us_pos_NO_0066 68
#define CTNODE_us_pos_NO_0068 70
DEF_STATIC_CONST_VAL_STRING(val_0030,"putting");
#define CTNODE_us_pos_NO_0070 72
#define CTNODE_us_pos_NO_0072 74
#define CTNODE_us_pos_NO_0074 76
#define CTNODE_us_pos_NO_0077 79
#define CTNODE_us_pos_NO_0079 81
#define CTNODE_us_pos_NO_0081 83
#define CTNODE_us_pos_NO_0083 85
#define CTNODE_us_pos_NO_0076 86
DEF_STATIC_CONST_VAL_STRING(val_0031,"frequent");
#define CTNODE_us_pos_NO_0086 88
#define CTNODE_us_pos_NO_0088 90
DEF_STATIC_CONST_VAL_STRING(val_0032,"bought");
#define CTNODE_us_pos_NO_0090 92
DEF_STATIC_CONST_VAL_STRING(val_0033,"read");
#define CTNODE_us_pos_NO_0092 94
DEF_STATIC_CONST_VAL_STRING(val_0034,"use");
#define CTNODE_us_pos_NO_0095 97
DEF_STATIC_CONST_VAL_STRING(val_0035,"it");
#define CTNODE_us_pos_NO_0097 99
#define CTNODE_us_pos_NO_0099 101
#define CTNODE_us_pos_NO_0094 102
DEF_STATIC_CONST_VAL_STRING(val_0036,"lived");
#define CTNODE_us_pos_NO_0102 104
DEF_STATIC_CONST_VAL_STRING(val_0037,"aged");
#define CTNODE_us_pos_NO_0104 106
DEF_STATIC_CONST_VAL_STRING(val_0038,"uses");
#define CTNODE_us_pos_NO_0106 108
#define CTNODE_us_pos_NO_0108 110
#define CTNODE_us_pos_NO_0110 112
#define CTNODE_us_pos_NO_0112 114
DEF_STATIC_CONST_VAL_STRING(val_0039,"associate");
#define CTNODE_us_pos_NO_0114 116
DEF_STATIC_CONST_VAL_STRING(val_0040,"compact");
#define CTNODE_us_pos_NO_0116 118
DEF_STATIC_CONST_VAL_STRING(val_0041,"suspect");
#define CTNODE_us_pos_NO_0118 120
#define CTNODE_us_pos_NO_0120 122
#define CTNODE_us_pos_NO_0123 125
#define CTNODE_us_pos_NO_0122 126
DEF_STATIC_CONST_VAL_STRING(val_0042,"produce");
#define CTNODE_us_pos_NO_0126 128
DEF_STATIC_CONST_VAL_STRING(val_0043,"produces");
#define CTNODE_us_pos_NO_0128 130
DEF_STATIC_CONST_VAL_STRING(val_0044,"excess");
#define CTNODE_us_pos_NO_0130 132
DEF_STATIC_CONST_VAL_STRING(val_0045,"combine");
#define CTNODE_us_pos_NO_0132 134
DEF_STATIC_CONST_VAL_STRING(val_0046,"tear");
#define CTNODE_us_pos_NO_0134 136
DEF_STATIC_CONST_VAL_STRING(val_0047,"presents");
#define CTNODE_us_pos_NO_0136 138
DEF_STATIC_CONST_VAL_STRING(val_0048,"minute");
#define CTNODE_us_pos_NO_0138 140
DEF_STATIC_CONST_VAL_STRING(val_0049,"rejects");
#define CTNODE_us_pos_NO_0140 142
#define CTNODE_us_pos_NO_0142 144
DEF_STATIC_CONST_VAL_STRING(val_0050,"mrs");
#define CTNODE_us_pos_NO_0144 146
DEF_STATIC_CONST_VAL_STRING(val_0051,"subject");
#define CTNODE_us_pos_NO_0146 148
DEF_STATIC_CONST_VAL_STRING(val_0052,"permits");
#define CTNODE_us_pos_NO_0148 150
DEF_STATIC_CONST_VAL_STRING(val_0053,"reading");
#define CTNODE_us_pos_NO_0152 154
#define CTNODE_us_pos_NO_0151 155
#define CTNODE_us_pos_NO_0150 156
DEF_STATIC_CONST_VAL_STRING(val_0054,"not");
#define CTNODE_us_pos_NO_0156 158
DEF_STATIC_CONST_VAL_STRING(val_0055,"who");
#define CTNODE_us_pos_NO_0158 160
DEF_STATIC_CONST_VAL_STRING(val_0056,"collect");
#define CTNODE_us_pos_NO_0160 162
#define CTNODE_us_pos_NO_0162 164
DEF_STATIC_CONST_VAL_STRING(val_0057,"permit");
#define CTNODE_us_pos_NO_0164 166
#define CTNODE_us_pos_NO_0166 168
DEF_STATIC_CONST_VAL_STRING(val_0058,"that");
#define CTNODE_us_pos_NO_0169 171
#define CTNODE_us_pos_NO_0168 172
#define CTNODE_us_pos_NO_0172 174
DEF_STATIC_CONST_VAL_STRING(val_0059,"records");
#define CTNODE_us_pos_NO_0174 176
DEF_STATIC_CONST_VAL_STRING(val_0060,"survey");
#define CTNODE_us_pos_NO_0176 178
DEF_STATIC_CONST_VAL_STRING(val_0061,"allies");
#define CTNODE_us_pos_NO_0178 180
DEF_STATIC_CONST_VAL_STRING(val_0062,"abuse");
#define CTNODE_us_pos_NO_0180 182
DEF_STATIC_CONST_VAL_STRING(val_0063,"project");
#define CTNODE_us_pos_NO_0182 184
DEF_STATIC_CONST_VAL_STRING(val_0064,"contract");
#define CTNODE_us_pos_NO_0184 186
DEF_STATIC_CONST_VAL_STRING(val_0065,"nasa");
#define CTNODE_us_pos_NO_0186 188
DEF_STATIC_CONST_VAL_STRING(val_0066,"impact");
#define CTNODE_us_pos_NO_0189 191
DEF_STATIC_CONST_VAL_STRING(val_0067,"concert");
#define CTNODE_us_pos_NO_0191 193
DEF_STATIC_CONST_VAL_STRING(val_0068,"progress");
#define CTNODE_us_pos_NO_0193 195
#define CTNODE_us_pos_NO_0195 197
DEF_STATIC_CONST_VAL_STRING(val_0069,"rebels");
#define CTNODE_us_pos_NO_0197 199
DEF_STATIC_CONST_VAL_STRING(val_0070,"associates");
#define CTNODE_us_pos_NO_0199 201
DEF_STATIC_CONST_VAL_STRING(val_0071,"graduate");
#define CTNODE_us_pos_NO_0201 203
#define CTNODE_us_pos_NO_0203 205
DEF_STATIC_CONST_VAL_STRING(val_0072,"export");
#define CTNODE_us_pos_NO_0205 207
DEF_STATIC_CONST_VAL_STRING(val_0073,"increases");
#define CTNODE_us_pos_NO_0207 209
#define CTNODE_us_pos_NO_0209 211
DEF_STATIC_CONST_VAL_STRING(val_0074,"and");
#define CTNODE_us_pos_NO_0211 213
DEF_STATIC_CONST_VAL_STRING(val_0075,"pps");
#define CTNODE_us_pos_NO_0213 215
#define CTNODE_us_pos_NO_0215 217
#define CTNODE_us_pos_NO_0217 219
#define CTNODE_us_pos_NO_0219 221
#define CTNODE_us_pos_NO_0188 222
DEF_STATIC_CONST_VAL_STRING(val_0076,"lives");
#define CTNODE_us_pos_NO_0222 224
#define CTNODE_us_pos_NO_0015 225
#define CTNODE_us_pos_NO_0226 228
DEF_STATIC_CONST_VAL_STRING(val_0077,"sources");
DEF_STATIC_CONST_VAL_STRING(val_0078,"r");
#define CTNODE_us_pos_NO_0228 230
DEF_STATIC_CONST_VAL_STRING(val_0079,"aux");
#define CTNODE_us_pos_NO_0230 232
#define CTNODE_us_pos_NO_0232 234
#define CTNODE_us_pos_NO_0234 236
DEF_STATIC_CONST_VAL_STRING(val_0080,"source");
#define CTNODE_us_pos_NO_0236 238
#define CTNODE_us_pos_NO_0238 240
#define CTNODE_us_pos_NO_0241 243
#define CTNODE_us_pos_NO_0240 244
#define CTNODE_us_pos_NO_0244 246
#define CTNODE_us_pos_NO_0246 248
#define CTNODE_us_pos_NO_0248 250
#define CTNODE_us_pos_NO_0225 251
#define CTNODE_us_pos_NO_0252 254
#define CTNODE_us_pos_NO_0254 256
DEF_STATIC_CONST_VAL_STRING(val_0081,"upset");
#define CTNODE_us_pos_NO_0256 258
#define CTNODE_us_pos_NO_0258 260
#define CTNODE_us_pos_NO_0260 262
#define CTNODE_us_pos_NO_0262 264
#define CTNODE_us_pos_NO_0264 266
#define CTNODE_us_pos_NO_0266 268
#define CTNODE_us_pos_NO_0268 270
#define CTNODE_us_pos_NO_0270 272
#define CTNODE_us_pos_NO_0251 273
#define CTNODE_us_pos_NO_0274 276
#define CTNODE_us_pos_NO_0273 277
#define CTNODE_us_pos_NO_0277 279
#define CTNODE_us_pos_NO_0280 282
#define CTNODE_us_pos_NO_0279 283
#define CTNODE_us_pos_NO_0283 285
#define CTNODE_us_pos_NO_0285 287
#define CTNODE_us_pos_NO_0287 289
DEF_STATIC_CONST_VAL_STRING(val_0082,"object");
#define CTNODE_us_pos_NO_0289 291
#define CTNODE_us_pos_NO_0291 293
#define CTNODE_us_pos_NO_0293 295
#define CTNODE_us_pos_NO_0295 297
#define CTNODE_us_pos_NO_0297 299
#define CTNODE_us_pos_NO_0299 301
#define CTNODE_us_pos_NO_0302 304
DEF_STATIC_CONST_VAL_STRING(val_0083,"at");
#define CTNODE_us_pos_NO_0304 306
#define CTNODE_us_pos_NO_0301 307
DEF_STATIC_CONST_VAL_STRING(val_0084,"refuse");
#define CTNODE_us_pos_NO_0308 310
DEF_STATIC_CONST_VAL_STRING(val_0085,"contrary");
#define CTNODE_us_pos_NO_0310 312
#define CTNODE_us_pos_NO_0312 314
#define CTNODE_us_pos_NO_0314 316
#define CTNODE_us_pos_NO_0307 317
#define CTNODE_us_pos_NO_0317 319
#define CTNODE_us_pos_NO_0319 321
#define CTNODE_us_pos_NO_0321 323
#define CTNODE_us_pos_NO_0323 325
#define CTNODE_us_pos_NO_0328 330
#define CTNODE_us_pos_NO_0327 331
#define CTNODE_us_pos_NO_0326 332
#define CTNODE_us_pos_NO_0333 335
#define CTNODE_us_pos_NO_0336 338
#define CTNODE_us_pos_NO_0335 339
#define CTNODE_us_pos_NO_0332 340
#define CTNODE_us_pos_NO_0325 341
DEF_STATIC_CONST_VAL_STRING(val_0086,"be");
#define CTNODE_us_pos_NO_0341 343
#define CTNODE_us_pos_NO_0343 345
DEF_STATIC_CONST_VAL_STRING(val_0087,"estimate");
#define CTNODE_us_pos_NO_0346 348
DEF_STATIC_CONST_VAL_STRING(val_0088,"estimates");
#define CTNODE_us_pos_NO_0349 351
#define CTNODE_us_pos_NO_0348 352
#define CTNODE_us_pos_NO_0345 353
DEF_STATIC_CONST_VAL_STRING(val_0089,"up");
#define CTNODE_us_pos_NO_0353 355
#define CTNODE_us_pos_NO_0355 357
#define CTNODE_us_pos_NO_0357 359
#define CTNODE_us_pos_NO_0359 361
DEF_STATIC_CONST_VAL_STRING(val_0090,"tears");
#define CTNODE_us_pos_NO_0361 363
#define CTNODE_us_pos_NO_0363 365
#define CTNODE_us_pos_NO_0000 366
DEF_STATIC_CONST_VAL_STRING(val_0091,"0");
@@ -0,0 +1,224 @@
/* Autogenerated from make_us_regexes */
static const unsigned char ordinal_number_rxprog[] = {
156, 6, 0, 119, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 0, 10, 0, 18, 4, 0, 0, 48, 49, 50, 51, 52,
53, 54, 55, 56, 57, 44, 0, 21, 0, 3, 6, 0, 9, 8, 0, 69,
116, 104, 0, 6, 0, 9, 8, 0, 60, 84, 72, 0, 6, 0, 9, 8,
0, 51, 115, 116, 0, 6, 0, 9, 8, 0, 42, 83, 84, 0, 6, 0,
9, 8, 0, 33, 110, 100, 0, 6, 0, 9, 8, 0, 24, 78, 68, 0,
6, 0, 9, 8, 0, 15, 114, 100, 0, 6, 0, 9, 8, 0, 6, 82,
68, 0, 31, 0, 3, 2, 0, 3, 0, 0, 0,
};
static const cst_regex ordinal_number_rx = {
0, 1, NULL, 0, 123,
(char *)ordinal_number_rxprog
};
const cst_regex * const ordinal_number = &ordinal_number_rx;
static const unsigned char hasvowel_rxprog[] = {
156, 6, 0, 35, 1, 0, 3, 10, 0, 6, 3, 0, 0, 4, 0, 14,
97, 101, 105, 111, 117, 65, 69, 73, 79, 85, 0, 10, 0, 6, 3, 0,
0, 2, 0, 3, 0, 0, 0,
};
static const cst_regex hasvowel_rx = {
0, 1, NULL, 0, 39,
(char *)hasvowel_rxprog
};
const cst_regex * const hasvowel = &hasvowel_rx;
static const unsigned char usmoney_rxprog[] = {
156, 6, 0, 72, 1, 0, 3, 8, 0, 5, 36, 0, 11, 0, 18, 4,
0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 44, 0, 6, 0,
34, 21, 0, 3, 6, 0, 25, 8, 0, 5, 46, 0, 11, 0, 17, 4,
0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 31, 0, 6,
6, 0, 3, 9, 0, 3, 2, 0, 3, 0, 0, 0,
};
static const cst_regex usmoney_rx = {
0, 1, NULL, 0, 76,
(char *)usmoney_rxprog
};
const cst_regex * const usmoney = &usmoney_rx;
static const unsigned char illion_rxprog[] = {
156, 6, 0, 25, 1, 0, 3, 10, 0, 6, 3, 0, 0, 8, 0, 10,
105, 108, 108, 105, 111, 110, 0, 2, 0, 3, 0, 0, 0,
};
static const cst_regex illion_rx = {
0, 1, NULL, 0, 29,
(char *)illion_rxprog
};
const cst_regex * const illion = &illion_rx;
static const unsigned char romannums_rxprog[] = {
156, 6, 0, 137, 1, 0, 3, 21, 0, 3, 6, 0, 36, 8, 0, 5,
73, 0, 6, 0, 8, 8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 3,
6, 0, 8, 8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 89, 6, 0,
9, 8, 0, 83, 73, 86, 0, 6, 0, 50, 8, 0, 5, 86, 0, 6,
0, 8, 8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 3, 6, 0, 8,
8, 0, 8, 73, 0, 6, 0, 3, 9, 0, 3, 6, 0, 8, 8, 0,
8, 73, 0, 6, 0, 3, 9, 0, 30, 6, 0, 9, 8, 0, 24, 73,
88, 0, 6, 0, 18, 8, 0, 5, 88, 0, 10, 0, 10, 4, 0, 0,
86, 73, 88, 0, 31, 0, 3, 2, 0, 3, 0, 0, 0,
};
static const cst_regex romannums_rx = {
0, 1, NULL, 0, 141,
(char *)romannums_rxprog
};
const cst_regex * const romannums = &romannums_rx;
static const unsigned char drst_rxprog[] = {
156, 6, 0, 45, 1, 0, 3, 21, 0, 3, 6, 0, 15, 4, 0, 6,
100, 68, 0, 4, 0, 21, 82, 114, 0, 6, 0, 15, 4, 0, 6, 83,
115, 0, 4, 0, 6, 116, 84, 0, 31, 0, 3, 2, 0, 3, 0, 0,
0,
};
static const cst_regex drst_rx = {
0, 1, NULL, 0, 49,
(char *)drst_rxprog
};
const cst_regex * const drst = &drst_rx;
static const unsigned char numess_rxprog[] = {
156, 6, 0, 31, 1, 0, 3, 11, 0, 17, 4, 0, 0, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 0, 8, 0, 5, 115, 0, 2, 0, 3,
0, 0, 0,
};
static const cst_regex numess_rx = {
0, 1, NULL, 0, 35,
(char *)numess_rxprog
};
const cst_regex * const numess = &numess_rx;
static const unsigned char sevenphonenumber_rxprog[] = {
156, 6, 0, 112, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
0, 8, 0, 5, 45, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0,
4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 2, 0,
3, 0, 0, 0,
};
static const cst_regex sevenphonenumber_rx = {
0, 1, NULL, 0, 116,
(char *)sevenphonenumber_rxprog
};
const cst_regex * const sevenphonenumber = &sevenphonenumber_rx;
static const unsigned char fourdigits_rxprog[] = {
156, 6, 0, 65, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 2,
0, 3, 0, 0, 0,
};
static const cst_regex fourdigits_rx = {
0, 1, NULL, 0, 69,
(char *)fourdigits_rxprog
};
const cst_regex * const fourdigits = &fourdigits_rx;
static const unsigned char threedigits_rxprog[] = {
156, 6, 0, 51, 1, 0, 3, 4, 0, 14, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 0, 4, 0, 14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
0, 2, 0, 3, 0, 0, 0,
};
static const cst_regex threedigits_rx = {
0, 1, NULL, 0, 55,
(char *)threedigits_rxprog
};
const cst_regex * const threedigits = &threedigits_rx;
static const unsigned char numbertime_rxprog[] = {
156, 6, 0, 75, 1, 0, 3, 6, 0, 17, 4, 0, 17, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 0, 6, 0, 3, 9, 0, 3, 4, 0,
14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 8, 0, 5, 58,
0, 4, 0, 10, 48, 49, 50, 51, 52, 53, 0, 4, 0, 14, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 0, 2, 0, 3, 0, 0, 0,
};
static const cst_regex numbertime_rx = {
0, 1, NULL, 0, 79,
(char *)numbertime_rxprog
};
const cst_regex * const numbertime = &numbertime_rx;
static const unsigned char numbertimexm_rxprog[] = {
156, 6, 0, 87, 1, 0, 3, 6, 0, 17, 4, 0, 17, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 0, 6, 0, 3, 9, 0, 3, 4, 0,
14, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 4, 0, 6, 58,
46, 0, 4, 0, 10, 48, 49, 50, 51, 52, 53, 0, 4, 0, 14, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 4, 0, 6, 97, 112, 0,
8, 0, 5, 109, 0, 2, 0, 3, 0, 0, 0,
};
static const cst_regex numbertimexm_rx = {
0, 1, NULL, 0, 91,
(char *)numbertimexm_rxprog
};
const cst_regex * const numbertimexm = &numbertimexm_rx;
static const unsigned char dottedabbrevs_rxprog[] = {
156, 6, 0, 161, 1, 0, 3, 21, 0, 3, 6, 0, 64, 4, 0, 56,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,
103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 0, 8, 0, 5, 46, 0, 31, 0, 3, 6, 0, 6,
7, 0, 73, 6, 0, 3, 9, 0, 3, 4, 0, 56, 65, 66, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
0, 6, 0, 8, 8, 0, 8, 46, 0, 6, 0, 3, 9, 0, 3, 2,
0, 3, 0, 0, 0,
};
static const cst_regex dottedabbrevs_rx = {
0, 1, NULL, 0, 165,
(char *)dottedabbrevs_rxprog
};
const cst_regex * const dottedabbrevs = &dottedabbrevs_rx;
static const unsigned char digitsslashdigits_rxprog[] = {
156, 6, 0, 48, 1, 0, 3, 11, 0, 17, 4, 0, 0, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 0, 8, 0, 5, 47, 0, 11, 0, 17,
4, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 2, 0,
3, 0, 0, 0,
};
static const cst_regex digitsslashdigits_rx = {
0, 1, NULL, 0, 52,
(char *)digitsslashdigits_rxprog
};
const cst_regex * const digitsslashdigits = &digitsslashdigits_rx;
static const unsigned char digits2dash_rxprog[] = {
156, 6, 0, 72, 1, 0, 3, 21, 0, 3, 6, 0, 28, 11, 0, 17,
4, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 8, 0,
5, 45, 0, 3, 0, 3, 31, 0, 3, 6, 0, 6, 7, 0, 37, 6,
0, 3, 9, 0, 3, 11, 0, 17, 4, 0, 0, 48, 49, 50, 51, 52,
53, 54, 55, 56, 57, 0, 2, 0, 3, 0, 0, 0,
};
static const cst_regex digits2dash_rx = {
0, 1, NULL, 0, 76,
(char *)digits2dash_rxprog
};
const cst_regex * const digits2dash = &digits2dash_rx;
static const unsigned char wandm_rxprog[] = {
156, 6, 0, 190, 1, 0, 3, 10, 0, 18, 4, 0, 0, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 44, 0, 11, 0, 17, 4, 0, 0, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 21, 0, 3, 6, 0, 9,
8, 0, 137, 108, 98, 0, 6, 0, 9, 8, 0, 128, 76, 66, 0, 6,
0, 10, 8, 0, 119, 108, 98, 115, 0, 6, 0, 10, 8, 0, 109, 76,
66, 83, 0, 6, 0, 9, 8, 0, 99, 102, 116, 0, 6, 0, 9, 8,
0, 90, 70, 84, 0, 6, 0, 9, 8, 0, 81, 107, 103, 0, 6, 0,
9, 8, 0, 72, 107, 109, 0, 6, 0, 9, 8, 0, 63, 111, 122, 0,
6, 0, 9, 8, 0, 54, 104, 122, 0, 6, 0, 9, 8, 0, 45, 72,
122, 0, 6, 0, 9, 8, 0, 36, 72, 90, 0, 6, 0, 10, 8, 0,
27, 75, 72, 122, 0, 6, 0, 10, 8, 0, 17, 77, 72, 122, 0, 6,
0, 10, 8, 0, 7, 71, 72, 122, 0, 31, 0, 3, 2, 0, 3, 0,
0, 0,
};
static const cst_regex wandm_rx = {
0, 1, NULL, 0, 194,
(char *)wandm_rxprog
};
const cst_regex * const wandm = &wandm_rx;
+902
View File
@@ -0,0 +1,902 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* US English text analysis functions */
/* */
/*************************************************************************/
#include <ctype.h>
#include "flite.h"
#include "usenglish.h"
#include "us_text.h"
#include "cst_regex.h"
static int text_splitable(const char *s,int i);
static cst_val *state_name(const char *name,cst_item *t);
/* compiled us regexes */
#include "us_regexes.h"
static const char * const wandm_abbrevs[99][2] =
{
{ "LB", "pounds" },
{ "LBS", "pounds" },
{ "lb", "pounds" },
{ "lbs", "pounds" },
{ "ft", "feet" },
{ "FT", "feet" },
{ "kg", "kilograms" },
{ "km", "kilometers" },
{ "oz", "ounces" },
{ "hz", "hertz" },
{ "Hz", "hertz" },
{ "HZ", "hertz" },
{ "KHz", "kilohertz" },
{ "MHz", "megahertz" },
{ "GHz", "gigahertz" },
{ NULL, NULL },
};
static const char * const eedwords[] = {
"to",
"can",
"can't",
"cannot",
"cant",
"could",
"couldn't",
"couldnt",
"will",
"shall",
NULL};
void us_text_init()
{
/* Nothing */
}
void us_text_deinit()
{
/* Nothing */
}
static int rex_like(const cst_item *t)
{
/* returns 1 if this is in a king like context */
char *pn = cst_downcase(ffeature_string(t,"p.name"));
char *ppn = cst_downcase(ffeature_string(t,"p.p.name"));
int v = 0;
if (cst_streq(pn,"louis") ||
cst_streq(pn,"henry") ||
cst_streq(pn,"charles") ||
cst_streq(pn,"philip") ||
cst_streq(pn,"george") ||
cst_streq(pn,"edward") ||
cst_streq(pn,"pius") ||
cst_streq(pn,"william") ||
cst_streq(pn,"richard") ||
cst_streq(pn,"ptolemy") ||
cst_streq(pn,"john") ||
cst_streq(pn,"paul") ||
cst_streq(pn,"peter") ||
cst_streq(pn,"nicholas") ||
cst_streq(pn,"frederick") ||
cst_streq(pn,"james") ||
cst_streq(pn,"alfonso") ||
cst_streq(pn,"ivan") ||
cst_streq(pn,"napolean") ||
cst_streq(pn,"leo") ||
cst_streq(pn,"gregory") ||
cst_streq(pn,"catherine") ||
cst_streq(pn,"alexandria") ||
cst_streq(pn,"pierre") ||
cst_streq(pn,"elizabeth") ||
cst_streq(pn,"mary"))
v = 1;
else if (cst_streq(ppn,"king") ||
cst_streq(ppn,"queen") ||
cst_streq(ppn,"pope") ||
cst_streq(ppn,"duke") ||
cst_streq(ppn,"tsar") ||
cst_streq(ppn,"emperor") ||
cst_streq(ppn,"shah") ||
cst_streq(ppn,"ceasar") ||
cst_streq(ppn,"duchess") ||
cst_streq(ppn,"tsarina") ||
cst_streq(ppn,"empress") ||
cst_streq(ppn,"baron") ||
cst_streq(ppn,"baroness") ||
cst_streq(ppn,"sultan") ||
cst_streq(ppn,"count") ||
cst_streq(ppn,"countess"))
v = 1;
cst_free(pn);
cst_free(ppn);
return v;
}
static int section_like(const cst_item *t)
{
/* returns 1 if this is in a king like context */
char *pn = cst_downcase(ffeature_string(t,"p.name"));
int v = 0;
if (cst_streq(pn,"section") ||
cst_streq(pn,"chapter") ||
cst_streq(pn,"part") ||
cst_streq(pn,"phrase") ||
cst_streq(pn,"verse") ||
cst_streq(pn,"scene") ||
cst_streq(pn,"act") ||
cst_streq(pn,"book") ||
cst_streq(pn,"volume") ||
cst_streq(pn,"chap") ||
cst_streq(pn,"war") ||
cst_streq(pn,"apollo") ||
cst_streq(pn,"trek") ||
cst_streq(pn,"fortran"))
v = 1;
cst_free(pn);
return v;
}
cst_utterance *us_textanalysis(cst_utterance *u)
{
if (!feat_present(u->features, "tokentowords_func"))
utt_set_feat(u, "tokentowords_func", itemfunc_val(us_tokentowords));
return default_textanalysis(u);
}
static cst_val *us_tokentowords_one(cst_item *token, const char *name);
cst_val *us_tokentowords(cst_item *token)
{
return us_tokentowords_one(token, item_feat_string(token, "name"));
}
static cst_val *add_break(cst_val *l)
{
/* add feature (break 1) to last item in this list */
const cst_val *i;
cst_val *t;
cst_features *f;
for (i=l; val_cdr(i); i=val_cdr(i));
if (i) /* might be empty list */
{
f = new_features();
feat_set_string(f,"break","1");
t = cons_val(val_car(i),features_val(f));
set_car((cst_val *)i,t);
}
return l;
}
static cst_val *us_tokentowords_one(cst_item *token, const char *name)
{
/* Return list of words that expand token/name */
char *p, *aaa, *bbb, *ccc;
int i,j,k,l;
cst_val *r, *s;
const char *nsw = "";
cst_lexicon *lex;
cst_utterance *utt;
/* printf("token_name %s name %s\n",item_name(token),name); */
/* FIXME: For SAPI and friends, any tokens with explicit
pronunciations need to be passed through as-is. This should be
done in the interface code rather than here once the
tokentowords hook is accessible. AWB: no, they should set the
nsw feature and this function should deal with it (doesn't yet though)*/
if (item_feat_present(token,"phones"))
return cons_val(string_val(name),NULL);
if (item_feat_present(token,"nsw"))
nsw = item_feat_string(token,"nsw");
utt = item_utt(token);
lex = val_lexicon(feat_val(utt->features,"lexicon"));
if ((cst_streq("a",name) || cst_streq("A",name)) &&
((item_next(token) == 0) ||
(!cst_streq(name,item_name(token))) ||
(!cst_streq("",ffeature_string(token,"punc")))))
{ /* if A is a sub part of a token, then its ey not ah */
r = cons_val(string_val("_a"),0);
}
else if (cst_strlen(name) == 0)
r = NULL;
else if (cst_regex_match(dottedabbrevs,name))
{ /* X.X.X */
aaa = cst_strdup(name);
for (i=j=0; aaa[i]; i++)
if (aaa[i] != '.')
{
aaa[j] = aaa[i];
j++;
}
aaa[j] = '\0';
r = en_exp_letters(aaa);
cst_free(aaa);
}
else if (cst_regex_match(cst_rx_commaint,name))
{ /* 99,999,999 */
aaa = cst_strdup(name);
for (j=i=0; i < cst_strlen(name); i++)
if (name[i] != ',')
{
aaa[j] = name[i];
j++;
}
aaa[j] = '\0';
r = en_exp_real(aaa);
cst_free(aaa);
}
else if (cst_regex_match(sevenphonenumber,name))
{ /* 234-3434 telephone numbers */
p=strchr(name,'-');
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
bbb = cst_strdup(p+1);
r = val_append(add_break(en_exp_digits(aaa)),
en_exp_digits(bbb));
cst_free(aaa);
cst_free(bbb);
}
else if
((cst_regex_match(threedigits,name) &&
((!cst_regex_match(cst_rx_digits,ffeature_string(token,"p.name"))
&& cst_regex_match(threedigits,ffeature_string(token,"n.name"))
&& cst_regex_match(fourdigits,ffeature_string(token,"n.n.name"))) ||
(cst_regex_match(sevenphonenumber,ffeature_string(token,"n.name"))) ||
(!cst_regex_match(cst_rx_digits,ffeature_string(token,"p.p.name"))
&& cst_regex_match(threedigits,ffeature_string(token,"p.name"))
&& cst_regex_match(fourdigits,ffeature_string(token,"n.name"))))) ||
(cst_regex_match(fourdigits,name) &&
(!cst_regex_match(cst_rx_digits,ffeature_string(token,"n.name"))
&& cst_regex_match(threedigits,ffeature_string(token,"p.name"))
&& cst_regex_match(threedigits,ffeature_string(token,"p.p.name")))))
{
/* part of a telephone number */
if (cst_streq("",ffeature_string(token,"punc")))
item_set_string(token,"punc",",");
r = add_break(en_exp_digits(name));
}
else if (cst_regex_match(numbertime,name))
{
p=strchr(name,':');
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
bbb = cst_strdup(p+1);
r = en_exp_number(aaa);
if (!cst_streq("00",bbb))
r = val_append(r,en_exp_id(bbb));
/* r = add_break(r); */
cst_free(aaa);
cst_free(bbb);
}
else if (cst_regex_match(numbertimexm,name))
{
p=strchr(name,':');
if (!p) p=strchr(name,'.');
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
bbb = cst_strdup(p+1);
bbb[2] = '\0';
ccc = cst_strdup(p+3);
r = en_exp_number(aaa);
if (!cst_streq("00",bbb))
r = val_append(r,en_exp_id(bbb));
/* r = add_break(r); */
r = val_append(r,en_exp_letters(ccc));
cst_free(aaa);
cst_free(bbb);
cst_free(ccc);
}
else if (cst_regex_match(digits2dash,name))
{ /* 999-999-999 etc */
bbb = cst_strdup(name);
for (r=0,aaa=p=bbb; *p; p++)
{
if (*p == '-')
{
*p = '\0';
r = val_append(val_reverse(add_break(en_exp_digits(aaa))),r);
aaa = p+1;
}
}
r = val_append(val_reverse(add_break(en_exp_digits(aaa))),r);
r = val_reverse(r);
cst_free(bbb);
}
else if (cst_regex_match(cst_rx_digits,name))
{ /* string of digits (use cart to disambiguate) */
if (cst_streq("nide",nsw))
r = en_exp_id(name);
else {
const cst_val *tv;
const char *ts;
char *rname;
rname = cst_strdup(item_feat_string(token,"name"));
if (cst_streq(name,rname))
tv = cart_interpret(token,&us_nums_cart);
else
{ /* in a recursive call */
item_set_string(token,"name",name);
tv = cart_interpret(token,&us_nums_cart);
item_set_string(token,"name",rname);
}
cst_free(rname);
ts = val_string(tv);
if (cst_streq(ts,"ordinal"))
r = en_exp_ordinal(name);
else if (cst_streq(ts,"digits"))
r = en_exp_digits(name);
else if (cst_streq(ts,"year"))
r = en_exp_id(name);
else
r = en_exp_number(name);
}
}
else if (cst_regex_match(romannums,name))
{ /* Roman numerals */
if (cst_streq("",ffeature_string(token,"p.punc")))
{ /* no preceeding punc */
char n[10];
cst_sprintf(n,"%d",en_exp_roman(name));
if (rex_like(token))
r = cons_val(string_val("the"),
en_exp_ordinal(n));
else if (section_like(token))
r = en_exp_number(n);
else
r = en_exp_letters(name);
}
else
r = en_exp_letters(name);
}
else if (cst_regex_match(drst,name))
{ /* St Andrew's St, Dr King Dr */
const char *street;
const char *saint;
if ((name[0] == 's') || (name[0] == 'S'))
{
street = "street";
saint = "saint";
}
else
{
street = "drive";
saint = "doctor";
}
if ((item_next(token) == 0) ||
strchr(item_feat_string(token,"punc"),','))
r = cons_val(string_val(street),NULL);
else if (strchr(ffeature_string(token,"punc"),','))
r = cons_val(string_val(saint),NULL);
else
{
const char *pname = ffeature_string(token,"p.name");
const char *nname = ffeature_string(token,"n.name");
if ((pname[0] >= 'A') && (pname[0] <= 'Z') &&
(nname[0] >= 'a') && (nname[0] <= 'z'))
r = cons_val(string_val(street),NULL);
else if ((pname[0] >= '0') && (pname[0] <= '9') &&
(nname[0] >= 'a') && (nname[0] <= 'z'))
r = cons_val(string_val(street),NULL);
else if ((pname[0] >= 'a') && (pname[0] <= 'z') &&
(nname[0] >= 'A') && (nname[0] <= 'Z'))
r = cons_val(string_val(saint),NULL);
else if (cst_streq(ffeature_string(token,"n.whitespace")," "))
r = cons_val(string_val(saint),NULL);
else
r = cons_val(string_val(street),NULL);
}
if (cst_streq(item_feat_string(token,"punc"),"."))
item_set_string(token,"punc","");
}
else if (cst_streq(name,"Mr"))
{
item_set_string(token,"punc","");
r = cons_val(string_val("mister"),NULL);
}
else if (cst_streq(name,"Mrs"))
{
item_set_string(token,"punc","");
r = cons_val(string_val("missus"),NULL);
}
else if ((cst_streq(name,"read")) ||
(cst_streq(name,"lead")))
{ /* checking WSJ examples, this seems a quick and easy way to */
/* get manty of these correct */
const char *pname = ffeature_string(token,"p.name");
for (i=0; eedwords[i]; i++)
if (cst_streq(pname,eedwords[i]))
break;
if (eedwords[i])
{ /* reed or leed */
if (name[0] == 'r')
r = cons_val(string_val("reed"),NULL);
else
r = cons_val(string_val("leed"),NULL);
}
else /* red or led */
{
if (name[0] == 'r')
r = cons_val(string_val("red"),NULL);
else
r = cons_val(string_val("led"),NULL);
}
}
else if (cst_streq(name,"am") || cst_streq(name,"AM"))
{
if (!cst_streq(name,item_name(token)))
r = en_exp_letters(name);
else if (item_prev(token) &&
(cst_regex_match(numbertime,ffeature_string(token,"p.name")) ||
cst_regex_match(cst_rx_digits,ffeature_string(token,"p.name"))))
r = en_exp_letters(name);
else
r = cons_val(string_val(name),NULL);
}
else if ((cst_strlen(name) == 1) &&
(name[0] >= 'A') &&
(name[0] <= 'Z') &&
(cst_streq(" ",ffeature_string(token,"n.whitespace"))) &&
(ffeature_string(token,"n.name")[0] >= 'A') &&
(ffeature_string(token,"n.name")[0] <= 'Z'))
{
item_set_string(token,"punc","");
aaa = cst_downcase(name);
if (cst_streq(aaa,"a"))
r = cons_val(string_val("_a"),0);
else
r = cons_val(string_val(aaa),0);
cst_free(aaa);
}
else if (cst_regex_match(cst_rx_double,name))
{ /* real numbers */
r = en_exp_real(name);
}
else if (cst_regex_match(ordinal_number,name))
{ /* explicit ordinals */
aaa = cst_strdup(name);
aaa[cst_strlen(name)-2] = '\0';
r = en_exp_ordinal(aaa);
cst_free(aaa);
}
else if ((cst_regex_match(illion,name)) &&
(cst_regex_match(usmoney,ffeature_string(token,"p.name"))))
{
r = cons_val(string_val(name),
cons_val(string_val("dollars"),NULL));
}
else if (cst_regex_match(usmoney,name))
{
/* US money */
/* printf("money, money, money %s\n", name); */
p = strchr(name,'.');
if (cst_regex_match(illion,ffeature_string(token,"n.name")))
{ /* carl sagan's billions and billions */
r = en_exp_real(&name[1]);
}
else if (!p)
{
aaa = cst_strdup(&name[1]);
if (cst_streq("1",aaa))
r = cons_val(string_val("dollar"),NULL);
else
r = cons_val(string_val("dollars"),NULL);
r = val_append(us_tokentowords_one(token,aaa),r);
cst_free(aaa);
}
else if ((cst_strlen(p) == 1) || (cst_strlen(p) > 3))
{ /* simply read as mumble point mumble */
r = val_append(en_exp_real(&name[1]),
cons_val(string_val("dollars"),NULL));
}
else
{
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
for (i=j=0; aaa[i] != '\0'; i++)
{
if (aaa[i] != ',')
{
aaa[j] = aaa[i];
j++;
}
}
aaa[j] = '\0';
if (cst_streq("00",p+1))
r = 0;
else if (cst_streq("01",p+1))
r = val_append(en_exp_number(p+1),
cons_val(string_val("cent"),NULL));
else
r = val_append(en_exp_number(p+1),
cons_val(string_val("cents"),NULL));
if (cst_streq("1",aaa+1))
r = cons_val(string_val("dollar"),r);
else
r = cons_val(string_val("dollars"),r);
r = val_append(en_exp_number(aaa+1),r);
cst_free(aaa);
}
}
else if (name[cst_strlen(name)-1] == '%')
{
aaa = cst_strdup(name);
aaa[cst_strlen(aaa)-1] = '\0';
r = val_append(us_tokentowords_one(token,aaa),
cons_val(string_val("per"),
cons_val(string_val("cent"),NULL)));
cst_free(aaa);
}
else if (cst_regex_match(numess,name))
{ /* 60s and 7s and 9s */
aaa = cst_strdup(name);
aaa[cst_strlen(name)-1] = '\0';
r = val_append(en_exp_number(aaa),
cons_val(string_val("'s"),0));
cst_free(aaa);
}
else if ((p=(cst_strrchr(name,'\''))))
{
static const char *pc[] = { "'s", "'ll", "'ve", "'d", NULL };
bbb = cst_downcase(p);
if (cst_member_string(bbb, pc))
{
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
r = val_append(us_tokentowords_one(token,aaa),
cons_val(string_val(bbb),0));
cst_free(aaa);
}
else if (cst_streq(p,"'tve")) /* admittedly rare and weird */
{
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)+2] = '\0';
r = val_append(us_tokentowords_one(token,aaa),
cons_val(string_val("'ve"),0));
cst_free(aaa);
}
else
{
aaa = cst_strdup(name);
strcpy(&aaa[cst_strlen(name)-cst_strlen(p)],p+1);
r = us_tokentowords_one(token,aaa);
cst_free(aaa);
}
cst_free(bbb);
}
else if ((cst_regex_match(digitsslashdigits,name)) &&
(cst_streq(name,item_name(token))))
{ /* might be fraction, or not */
p=strchr(name,'/');
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
bbb = cst_strdup(p+1);
if ((cst_streq("1",aaa)) && (cst_streq("2",bbb)))
r = cons_val(string_val("a"),
cons_val(string_val("half"),0));
else if (atoi(aaa) < (atoi(bbb)))
{
r = val_append(en_exp_number(aaa),
en_exp_ordinal(bbb));
if (atoi(aaa) > 1)
r = val_append(r,cons_val(string_val("'s"),0));
}
else
r = val_append(en_exp_number(aaa),
cons_val(string_val("slash"),
en_exp_number(bbb)));
if ((cst_regex_match(cst_rx_digits,ffeature_string(token,"p.name")))
&& (item_prev(token))) /* don't mistake "0" as a number */
r = cons_val(string_val("and"),r);
cst_free(aaa);
cst_free(bbb);
}
else if ((p=(strchr(name,'-'))))
{ /* aaa-bbb */
aaa = cst_strdup(name);
aaa[cst_strlen(name)-cst_strlen(p)] = '\0';
bbb = cst_strdup(p+1);
if (cst_regex_match(cst_rx_digits,aaa) &&
cst_regex_match(cst_rx_digits,bbb))
{
ccc = cst_strdup(name);
item_set_string(token,"name",bbb);
r = us_tokentowords_one(token,bbb);
item_set_string(token,"name",aaa);
r = val_append(us_tokentowords_one(token,aaa),
cons_val(string_val("to"),r));
item_set_string(token,"name",ccc);
cst_free(ccc);
}
else
r = val_append(us_tokentowords_one(token,aaa),
us_tokentowords_one(token,bbb));
cst_free(aaa);
cst_free(bbb);
}
else if (cst_regex_match(wandm,name))
{ /* weights and measures */
for (j=cst_strlen(name)-1; j > 0; j--)
if (cst_strchr("0123456789",name[j]))
break;
j += 1;
for (i=0; wandm_abbrevs[i][0]; i++)
if (cst_streq(name+j,wandm_abbrevs[i][0]))
break;
aaa = cst_strdup(name);
aaa[j] = '\0';
/* remove any commas */
for (k=0,l=0; aaa[l]; k++,l++)
{
if (aaa[l] == ',') l++;
aaa[k] = aaa[l];
}
aaa[k] = '\0';
if (!wandm_abbrevs[i][0]) /* didn't find an expansion */
r = val_append(en_exp_number(aaa),
us_tokentowords_one(token,name+j));
else
r = val_append(en_exp_number(aaa),
cons_val(string_val(wandm_abbrevs[i][1]),NULL));
cst_free(aaa);
}
else if ((cst_strlen(name) > 1) && (!cst_regex_match(cst_rx_alpha,name)))
{ /* its not just alphas */
for (i=0; name[i] != '\0'; i++)
if (text_splitable(name,i))
break;
aaa = cst_strdup(name);
aaa[i+1] = '\0';
bbb = cst_strdup(&name[i+1]);
item_set_string(token,"nsw","nide");
r = val_append(us_tokentowords_one(token,aaa),
us_tokentowords_one(token,bbb));
cst_free(aaa);
cst_free(bbb);
}
else if ((s = state_name(name,token)))
{
r = s;
}
else if ((cst_strlen(name) > 1) &&
(cst_regex_match(cst_rx_alpha,name)) &&
(!in_lex(lex,name,NULL)) &&
(!us_aswd(name)))
/* Still not quiet right, if there is a user_lex we need to check */
/* it too -- but user_lex isn't user setable yet */
/* Need common exception list */
/* unpronouncable list of alphas */
r = en_exp_letters(name);
/* buckets of other stuff missing */
else /* just a word */
{
aaa = cst_downcase(name);
r = cons_val(string_val(aaa),0);
cst_free(aaa);
}
return r;
}
static int text_splitable(const char *s,int i)
{
/* should token be split after this */
if (strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s[i]) &&
strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s[i+1]))
return FALSE;
else if (strchr("0123456789",s[i]) &&
strchr("0123456789",s[i+1]))
return FALSE;
else
return TRUE;
}
static const char * const states[99][5] =
{
{ "AL", "ambiguous", "alabama" , NULL, NULL },
{ "Al", "ambiguous", "alabama" , NULL, NULL },
{ "Ala", "", "alabama" , NULL, NULL },
{ "AK", "", "alaska" , NULL, NULL },
{ "Ak", "", "alaska" , NULL, NULL },
{ "AZ", "", "arizona" , NULL, NULL },
{ "Az", "", "arizona" , NULL, NULL },
{ "CA", "", "california" , NULL, NULL },
{ "Ca", "", "california" , NULL, NULL },
{ "Cal", "ambiguous", "california" , NULL, NULL },
{ "Calif", "", "california" , NULL, NULL },
{ "CO", "ambiguous", "colorado" , NULL, NULL },
{ "Co", "ambiguous", "colorado" , NULL, NULL },
{ "Colo", "", "colorado" , NULL, NULL },
{ "DC", "", "d" , "c", NULL },
{ "DE", "", "delaware" , NULL, NULL },
{ "De", "ambiguous", "delaware" , NULL, NULL },
{ "Del", "ambiguous", "delaware" , NULL, NULL },
{ "FL", "", "florida" , NULL, NULL },
{ "Fl", "ambiguous", "florida" , NULL, NULL },
{ "Fla", "", "florida" , NULL, NULL },
{ "GA", "", "georgia" , NULL, NULL },
{ "Ga", "", "georgia" , NULL, NULL },
{ "HI", "", "hawaii" , NULL, NULL },
{ "Hi", "ambiguous", "hawaii" , NULL, NULL },
{ "IA", "", "iowa" , NULL, NULL },
{ "Ia", "ambiguous", "iowa" , NULL, NULL },
{ "Ind", "ambiguous", "indiana" , NULL, NULL },
{ "ID", "ambiguous", "idaho" , NULL, NULL },
{ "IL", "ambiguous", "illinois" , NULL, NULL },
{ "Il", "ambiguous", "illinois" , NULL, NULL },
{ "ILL", "ambiguous", "illinois" , NULL, NULL },
{ "KS", "", "kansas" , NULL, NULL },
{ "Ks", "", "kansas" , NULL, NULL },
{ "Kans", "", "kansas" , NULL, NULL },
{ "KY", "ambiguous", "kentucky" , NULL, NULL },
{ "Ky", "ambiguous", "kentucky" , NULL, NULL },
{ "LA", "ambiguous", "louisiana" , NULL, NULL },
{ "La", "ambiguous", "louisiana" , NULL, NULL },
{ "Lou", "ambiguous", "louisiana" , NULL, NULL },
{ "Lous", "ambiguous", "louisiana" , NULL, NULL },
{ "MA", "ambiguous", "massachusetts" , NULL, NULL },
{ "Mass", "ambiguous", "massachusetts" , NULL, NULL },
{ "Ma", "ambiguous", "massachusetts" , NULL, NULL },
{ "MD", "ambiguous", "maryland" , NULL, NULL },
{ "Md", "ambiguous", "maryland" , NULL, NULL },
{ "ME", "ambiguous", "maine" , NULL, NULL },
{ "Me", "ambiguous", "maine" , NULL, NULL },
{ "MI", "", "michigan" , NULL, NULL },
{ "Mi", "ambiguous", "michigan" , NULL, NULL },
{ "Mich", "ambiguous", "michigan" , NULL, NULL },
{ "MN", "ambiguous", "minnestota" , NULL, NULL },
{ "Minn", "ambiguous", "minnestota" , NULL, NULL },
{ "MS", "ambiguous", "mississippi" , NULL, NULL },
{ "Miss", "ambiguous", "mississippi" , NULL, NULL },
{ "MT", "ambiguous", "montanna" , NULL, NULL },
{ "Mt", "ambiguous", "montanna" , NULL, NULL },
{ "MO", "ambiguous", "missouri" , NULL, NULL },
{ "Mo", "ambiguous", "missouri" , NULL, NULL },
{ "NC", "ambiguous", "north" , "carolina", NULL },
{ "ND", "ambiguous", "north" , "dakota", NULL },
{ "NE", "ambiguous", "nebraska" , NULL, NULL },
{ "Ne", "ambiguous", "nebraska" , NULL, NULL },
{ "Neb", "ambiguous", "nebraska" , NULL, NULL },
{ "NH", "ambiguous", "new" , "hampshire", NULL },
{ "NV", "", "nevada" , NULL, NULL },
{ "Nev", "", "nevada" , NULL, NULL },
{ "NY", "", "new" , "york", NULL },
{ "OH", "ambiguous", "ohio" , NULL, NULL },
{ "OK", "ambiguous", "oklahoma" , NULL, NULL },
{ "Okla", "", "oklahoma" , NULL, NULL },
{ "OR", "ambiguous", "oregon" , NULL, NULL },
{ "Or", "ambiguous", "oregon" , NULL, NULL },
{ "Ore", "ambiguous", "oregon" , NULL, NULL },
{ "PA", "ambiguous", "pennsylvania" , NULL, NULL },
{ "Pa", "ambiguous", "pennsylvania" , NULL, NULL },
{ "Penn", "ambiguous", "pennsylvania" , NULL, NULL },
{ "RI", "ambiguous", "rhode" , "island", NULL },
{ "SC", "ambiguous", "south" , "carlolina", NULL },
{ "SD", "ambiguous", "south" , "dakota", NULL },
{ "TN", "ambiguous", "tennesee" , NULL, NULL },
{ "Tn", "ambiguous", "tennesee" , NULL, NULL },
{ "Tenn", "ambiguous", "tennesee" , NULL, NULL },
{ "TX", "ambiguous", "texas" , NULL, NULL },
{ "Tx", "ambiguous", "texas" , NULL, NULL },
{ "Tex", "ambiguous", "texas" , NULL, NULL },
{ "UT", "ambiguous", "utah" , NULL, NULL },
{ "VA", "ambiguous", "virginia" , NULL, NULL },
{ "WA", "ambiguous", "washington" , NULL, NULL },
{ "Wa", "ambiguous", "washington" , NULL, NULL },
{ "Wash", "ambiguous", "washington" , NULL, NULL },
{ "WI", "ambiguous", "wisconsin" , NULL, NULL },
{ "Wi", "ambiguous", "wisconsin" , NULL, NULL },
{ "WV", "ambiguous", "west" , "virginia", NULL },
{ "WY", "ambiguous", "wyoming" , NULL, NULL },
{ "Wy", "ambiguous", "wyoming" , NULL, NULL },
{ "Wyo", "", "wyoming" , NULL, NULL },
{ "PR", "ambiguous", "puerto" , "rico", NULL },
{ NULL, NULL, "puerto" , "rico", NULL }
};
static cst_val *state_name(const char *name,cst_item *t)
{
int s,j;
int do_it = 0;
cst_val *r = 0;
for (s=0; states[s][0]; s++)
{
if (cst_streq(states[s][0],name))
{
if (cst_streq(states[s][1],"ambiguous"))
{
const char *pname = ffeature_string(t,"p.name");
const char *nname = ffeature_string(t,"n.name");
/* previous name is capitalized */
if (((strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ",pname[0])) &&
(cst_strlen(pname) > 2) &&
(cst_regex_match(cst_rx_alpha,pname))) &&
((strchr("abcdefghijklmnopqrstuvwxyz",nname[0])) ||
(item_next(t) == 0) ||
(cst_streq(".",item_feat_string(t,"punc"))) ||
(((cst_strlen(nname) == 5 || (cst_strlen(nname) == 10)) &&
cst_regex_match(cst_rx_digits,nname)))))
do_it = 1;
else
do_it = 0;
}
else
do_it = 1;
if (do_it)
{
for (j=2; states[s][j]; j++)
r = cons_val(string_val(states[s][j]),r);
return val_reverse(r);
}
}
}
return r;
}
@@ -0,0 +1,64 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2001 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* */
/* US Text analysis */
/* */
/*************************************************************************/
#ifndef _US_TEXT_H__
#define _US_TEXT_H__
#include "cst_val.h"
#include "cst_hrg.h"
#include "cst_cart.h"
cst_val *en_exp_number(const char *numstring);
cst_val *en_exp_digits(const char *numstring);
cst_val *en_exp_id(const char *numstring);
cst_val *en_exp_ordinal(const char *numstring);
cst_val *en_exp_letters(const char *lets);
cst_val *en_exp_real(const char *numstring);
int en_exp_roman(const char *roman);
extern const cst_cart us_nums_cart;
void us_text_init();
cst_utterance *us_textanalysis(cst_utterance *u);
cst_val *us_tokentowords(cst_item *token);
int us_aswd(const char *w);
#endif
@@ -0,0 +1,137 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: January 2001 */
/*************************************************************************/
/* Generic models for US English */
/*************************************************************************/
/* ----------------------------------------------------------------- */
/* The English TTS System "Flite+hts_engine" */
/* developed by HTS Working Group */
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2005-2008 Tokyo Institute of Technology */
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* - Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* - Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials provided */
/* with the distribution. */
/* - Neither the name of the HTS working group nor the names of its */
/* contributors may be used to endorse or promote products derived */
/* from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */
/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */
/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
/* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */
/* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */
/* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* ----------------------------------------------------------------- */
#include "flite.h"
#include "usenglish.h"
#ifndef FLITE_PLUS_HTS_ENGINE
#include "us_f0.h"
#endif /* !FLITE_PLUS_HTS_ENGINE */
#include "us_text.h"
#include "us_ffeatures.h"
static const char * const us_english_punctuation = "\"'`.,:;!?(){}[]";
static const char * const us_english_prepunctuation = "\"'`({[";
static const char * const us_english_singlecharsymbols = "";
static const char * const us_english_whitespace = " \t\n\r";
void usenglish_init(cst_voice *v)
{
us_text_init();
/* utterance break function */
feat_set(v->features,"utt_break",breakfunc_val(&default_utt_break));
/* Phoneset */
feat_set(v->features,"phoneset",phoneset_val(&us_phoneset));
feat_set_string(v->features,"silence",us_phoneset.silence);
/* Text analyser */
feat_set_string(v->features,"text_whitespace",us_english_whitespace);
feat_set_string(v->features,"text_postpunctuation",us_english_punctuation);
feat_set_string(v->features,"text_prepunctuation",
us_english_prepunctuation);
feat_set_string(v->features,"text_singlecharsymbols",
us_english_singlecharsymbols);
feat_set(v->features,"tokentowords_func",itemfunc_val(&us_tokentowords));
/* very simple POS tagger */
feat_set(v->features,"pos_tagger_cart",cart_val(&us_pos_cart));
/* Phrasing */
feat_set(v->features,"phrasing_cart",cart_val(&us_phrasing_cart));
/* Intonation */
feat_set(v->features,"int_cart_accents",cart_val(&us_int_accent_cart));
feat_set(v->features,"int_cart_tones",cart_val(&us_int_tone_cart));
#ifndef FLITE_PLUS_HTS_ENGINE
/* Duration */
feat_set(v->features,"dur_cart",cart_val(&us_durz_cart));
feat_set(v->features,"dur_stats",dur_stats_val((dur_stats *)us_dur_stats));
/* f0 model */
feat_set(v->features,"f0_model_func",uttfunc_val(&us_f0_model));
#endif /* !FLITE_PLUS_HTS_ENGINE */
us_ff_register(v->ffunctions);
}
@@ -0,0 +1,120 @@
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of this work, and to */
/* permit persons to whom this work is furnished to do so, subject to */
/* the following conditions: */
/* 1. The code must retain the above copyright notice, this list of */
/* conditions and the following disclaimer. */
/* 2. Any modifications must be clearly marked as such. */
/* 3. Original authors' names are not deleted. */
/* 4. The authors' names are not used to endorse or promote products */
/* derived from this software without specific prior written */
/* permission. */
/* */
/* CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK */
/* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
/* SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE */
/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
/* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
/* THIS SOFTWARE. */
/* */
/*************************************************************************/
/* Author: Alan W Black (awb@cs.cmu.edu) */
/* Date: December 2000 */
/*************************************************************************/
/* Generic models for US English */
/*************************************************************************/
/* ----------------------------------------------------------------- */
/* The English TTS System "Flite+hts_engine" */
/* developed by HTS Working Group */
/* http://hts-engine.sourceforge.net/ */
/* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2005-2013 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* 2005-2008 Tokyo Institute of Technology */
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* - Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* - Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials provided */
/* with the distribution. */
/* - Neither the name of the HTS working group nor the names of its */
/* contributors may be used to endorse or promote products derived */
/* from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */
/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */
/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
/* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
/* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */
/* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */
/* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* ----------------------------------------------------------------- */
#ifndef _US_ENGLISH_H_
#define _US_ENGLISH_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "cst_utterance.h"
#include "cst_cart.h"
#include "cst_val.h"
#include "cst_phoneset.h"
#include "cst_lexicon.h"
#include "cst_synth.h"
/* Voices call this to use usenglish. */
void usenglish_init(cst_voice *v);
/* Default functions and values that you might need. */
#ifndef FLITE_PLUS_HTS_ENGINE
cst_utterance *us_f0_model(cst_utterance *u);
#endif /* !FLITE_PLUS_HTS_ENGINE */
extern const cst_phoneset us_phoneset;
extern const cst_cart us_phrasing_cart;
extern const cst_cart us_int_accent_cart;
extern const cst_cart us_int_tone_cart;
#ifndef FLITE_PLUS_HTS_ENGINE
extern const cst_cart us_durz_cart;
#endif /* !FLITE_PLUS_HTS_ENGINE */
extern const cst_cart us_pos_cart;
#ifndef FLITE_PLUS_HTS_ENGINE
extern const dur_stat * const us_dur_stats[];
#endif /* !FLITE_PLUS_HTS_ENGINE */
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif