English grapheme-to-phoneme for sound.speech. Two layers; the first
match wins:
A[B]C=PH PH ... turns the letters B, between left context A and
right context C, into the listed phonemes. The first matching rule wins
and the cursor moves past B. The rule set is written in that formalism,
not copied from NRL. It reads about 90% of ordinary text right; the
dictionary catches the worst of the rest.Context symbols:
# one or more vowels (a e i o u y) : zero or more consonants
^ exactly one consonant . a voiced consonant (bdvgjlmnrwz)
+ a front vowel (e i y) & a sibilant (s c g z x j ch sh)
@ t s r d l z n j th ch sh % a suffix (e er es ed ing ely)
(space) word boundary other letters match literally
The rules carry no stress. A word the rules spell gets primary stress on
its first vowel. Put a word the rules mangle into the dictionary, or write
its events by hand for sound.speech.synth.
| Name | Signature |
|---|---|
| word | word(w) -> events |
word(
w) ->events
Transcribe one lowercase word into phoneme events
Returns a list of { ph, stress }. The dictionary is tried first, with
the word's apostrophes and then without. Otherwise the rules spell the
word, with primary stress on the first vowel.