(For details on the Sound Change Rule format, click here.)
This generator is based on the Sound Change Applier found at Zompist.com| MainFrames | |||||
|
|
|||||
The Dialect Generator takes words as input, applies a set of sound changes described in variables and rules, and returns a set of modified words.
For instance, The Dialect Generator will take the input data, variables, and rules on the left and produce the output on the right:
| Input | Variables | Output |
|
lector |
V = aeiou C = ptcqbdgmnlrhs F = ie B = ou S = ptc Z = bdg |
leitor doutor fogo jogo distrito cidade adotar obra segundo |
| Rules | ||
| s//_# m//_# e//Vr_# v//V_V u/o/_# gn/nh/_ S/Z/V_V c/i/F_t c/u/B_t p//V_t ii/i/_ e//C_rV |
Hopefully, the format of the rules will be familiar to any linguist. For instance,
here's one sound change:
c/g/V_V
This rule says to change c to g between vowels. (We'll see how to generalize
this rule below.)
More generally, a sound change looks like this:
x/y/z
where x is the thing to be changed, y is what it changes to, and z is the environment.
The z part must always contain an underline _, representing the part that changes.
That can be all there is, as in
gn/nh/_
which tells the module to replace gn with nh unconditionally.
The character # represents the beginning or end of the word. So
u/o/_#
means to replace u with o, but only at the end of the word.
The middle (y) part can be blank, as in
s//_#
This means that s is deleted when it ends a word.
The evironment (the z part) can contain variables, like V above. These are defined in the first parameter to the constructor. I use capital letters for this, though this is not a requirement. Variables can only be one character long. You can defined any variables needed to state your sound changed. E.g. you could define S to be any stop, or K for any coronal, or whatever.
So the variable definition and rule
F = 'ie'
c/i/F_t
means that c changes to i after a front vowel and before a t.
You can use variables in the first two parts as well. For instance, suppose
you've defined
S = 'ptc',
Z = 'bdg'
S/Z/V_V
This means that the stops ptc change to their voiced equivalents bdg between vowels. In this usage, the variables must correspond one for one--p goes to b, t goes to d, etc. Each character in the replacement variable (here Z) gives the transformed value of each character in the input variable (here S). Make sure the two variable definitions are the same length!
A variable can also be set to a fixed value, or deleted. E.g.
Z//V_V
says to delete voiced stops between vowels, and
Z/?/V_V
would translate all voiced stops between vowels to a glottal stop ?.
Rules apply in the order they're listed. So, with the word opera and the rules
p/b/V_V
e//C_rV
the first rule voices the p, resulting in obera; the second deletes an e between
a consonant and an intervocalic r, resulting in obra.
One or more elements in the environment can be marked as optional with parentheses.
E.g.
u/ü/_C(C)F
says to change u to ü when it's followed by one or two consonants and then
a front vowel.
Though sound changes can refer to digraphs, variables can't include them. So,
for instance, the following rule is intended to delete an i onset following
an intervocalic consonant:
i//VC_V
However, it won'f affect (say) achior, because the C will not match the digraph
ch. You could write extra rules to handle the digraphs; but it's often more
convenient to use an orthography where every phoneme corresponds to a single
character.
You can write transformation rules at the beginning of your sound change rules
to transform digraphs in the input data:
ph/f/_
| MainFrames | |||||
|
|
|||||