| 1 |
/* |
| 2 |
* Copyright (C) 2005 to 2015 by Jonathan Duddington |
| 3 |
* email: [email protected] |
| 4 |
* Copyright (C) 2015-2018 Reece H. Dunn |
| 5 |
* Copyright (C) 2018 Juho Hiltunen |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 3 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, see: <http://www.gnu.org/licenses/>. |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef ESPEAK_NG_DICTIONARY_H |
| 22 |
#define ESPEAK_NG_DICTIONARY_H |
| 23 |
|
| 24 |
#include "espeak_ng.h" // for ESPEAK_NG_API |
| 25 |
#include "phoneme.h" // for PHONEME_TAB |
| 26 |
#include "synthesize.h" // for PHONEME_LIST |
| 27 |
#include "translate.h" // for Translator, WORD_TAB |
| 28 |
|
| 29 |
#ifdef __cplusplus |
| 30 |
extern "C" |
| 31 |
{ |
| 32 |
#endif |
| 33 |
|
| 34 |
extern const char stress_phonemes[]; |
| 35 |
|
| 36 |
int LoadDictionary(Translator *tr, const char *name, int no_error); |
| 37 |
int HashDictionary(const char *string); |
| 38 |
const char *EncodePhonemes(const char *p, char *outptr, int *bad_phoneme); |
| 39 |
void DecodePhonemes(const char *inptr, char *outptr); |
| 40 |
char *WritePhMnemonic(char *phon_out, PHONEME_TAB *ph, PHONEME_LIST *plist, int use_ipa, int *flags); |
| 41 |
const char *GetTranslatedPhonemeString(int phoneme_mode); |
| 42 |
int GetVowelStress(Translator *tr, unsigned char *phonemes, signed char *vowel_stress, int *vowel_count, int *stressed_syllable, int control); |
| 43 |
int IsVowel(Translator *tr, int letter); |
| 44 |
void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int control); |
| 45 |
void AppendPhonemes(Translator *tr, char *string, int size, const char *ph); |
| 46 |
int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, char *end_phonemes, int word_flags, unsigned int *dict_flags); |
| 47 |
int TransposeAlphabet(Translator *tr, char *text); |
| 48 |
int Lookup(Translator *tr, const char *word, char *ph_out); |
| 49 |
int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *flags, int end_flags, WORD_TAB *wtab); |
| 50 |
int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy); |
| 51 |
|
| 52 |
#ifdef __cplusplus |
| 53 |
} |
| 54 |
#endif |
| 55 |
|
| 56 |
#endif |
| 57 |
|