Lexurgy Sound Changer Tutorial — Getting Started
Basic Rules
The simplest kind of sound change rule looks like this:
The first thing you see is the rule's name, lot-thought-merger
, followed by a colon. Giving your rules descriptive names helps keep your sound changes organized. Rule names can't contain spaces, but you can separate words with hyphens.
After the rule's name comes an expression describing what you want the rule to do. In this case, ɔ => ɑ
tells Lexurgy to replace any ɔ
character it finds with ɑ
. The example shows the effect on the words θɔt
("thought") and bɔt
("bought"), making them rhyme with "lot".
Multiple Rules
The history of a language involves many sound changes. Normally, you'll write these one after the other, giving each its own name:
Lexurgy executes rules in order, from top to bottom. At the beginning, there are no instances of ɑ
for the lot-fronting
rule to apply to; but since the lot-thought-merger
rule happens first, the original ɔ
vowels have already been converted to ɑ
by the time the lot-fronting
rule applies, giving it something to apply to. The word θɔt
becomes θɑt
because of the first rule, and then θat
because of the second rule.
You can use the "Trace Changes" switch to see how each input word changes as it flows through each rule. When creating your own sound changes, if the results aren't what you expect, turning on "Trace Changes" can help you quickly narrow down where the problem is.
Conditions
Changing all instances of one sound into another can only do so much. More interesting is when a sound change depends on neighbouring sounds.
Take this rule:
The sound k
changes to ʃ
, but only before a
; the k
s before other vowels or at the end of a word are unaffected. The underscore in the condition represents the sound matched by the rule: / _ a
means "only before a
", while / a _
means "only after a
". You can even put conditions on both sides: / a _ a
means "only between two a
s".
Exceptions
You can also specify conditions under which the change doesn't happen:
Now k
only changes to ʃ
when it isn't before a
.
You can put a condition and an exception on the same rule:
Multi-Character Symbols
If you want to use a sequence of characters to represent one sound in your rules, you can declare symbols above your rules:
Notice that the ts
and dz
sequences are unaffected by the changes applied to t
and d
; Lexurgy considers ts
to be a completely different sound from t
or s
.
Special Characters
Lexurgy works in Unicode, so it can seamlessly handle IPA characters and other special characters. You just need a way to enter them: either copy them from a site like this interactive IPA chart, or install an IPA keyboard layout like this one.
While Lexurgy handles exotic characters with ease, it'll have trouble if you try to write rules using characters like +
, $
, !
, and other characters that mean something special to Lexurgy. If you need to use one of these characters as a phonetic symbol (say you're making a click language and want to use !
), you have to put a backslash in front of it to tell Lexurgy that you mean a literal [!]:
Comments
Any line that starts with #
is a comment, and Lexurgy will ignore it. Comments can help you remember why you wrote your sound changes a certain way, especially if you had to use a complicated rule that's hard to understand just by looking at it.
You can put comments on their own, inside rules, or even at the ends of lines:
Alternative Lists
Often, several sounds are affected by a change, or trigger it. You could write a bunch of separate rules listing each possibility, but to make this faster and easier, Lexurgy provides alternative lists.
For example, it's common to have a change happen only between vowels. In a language with the classic five-vowel system, that would be 25 combinations, which would be very tedious to write out in full. Instead of listing them out, you use alternative lists, like this:
You can also use alternative lists in the input and output parts of the rule. If only the input is an alternative list, all of the sounds in it will change into the single new sound:
If both are alternative lists, they must be the same length, and each sound in the old list will change into the corresponding sound in the new list:
You can also use alternative lists to specify multiple environments. For example, this rule converts stops into fricatives both between vowels and before other stops:
Sound Classes
If you find yourself using the same alternative lists over and over again, you can give them convenient names using sound classes:
Be sure to include the @
character; vowel
without the @
character means the literal sounds /vowel/!
You can use the names of previously defined classes in your class definitions:
The stop
class includes all the sounds from unvcdstop
and vcdstop
, in order. You can use this to build up larger and larger classes of sounds without repeating yourself.
Word Edges
You can specify that a rule only applies at the beginning or end of a word by marking the edge of the word with a dollar sign:
Inserting and Deleting Sounds
If you want to delete a sound entirely, put an asterisk after the arrow:
Similarly, you can add epenthetic sounds by putting an asterisk before the arrow and specifying the environment where the sound should appear:
But watch out; if you forget the condition, the sound will get inserted everywhere!
Interactions Between Words
If you write multiple words on a line in the input (separated by spaces), each will be treated as a separate word:
You can also match and manipulate the spaces between words using $$
. You can use this to stick words together:
Break them apart:
And apply sound changes that cross word boundaries (sandhi rules):
Wildcards
The symbol []
matches any single sound. It's often useful for “skipping” a certain number of sounds. For example, the following rule applies umlaut only across an intervening sound:
Sequences
A rule can affect a sequence of consecutive sounds at the same time. For example, this rule implements compensatory lengthening when a coda stop consonant is lost:
Lexurgy lines up {a, e, i, o, u}
with {aː, eː, iː, oː, uː}
and {p, t, k}
with *
, and applies both changes.
In most cases, the number of elements must be the same on each side of the =>
. If a change adds or deletes some of the sounds, fill in the missing spaces with asterisks.
Optional and Repeated Segments
You can mark part of the environment optional by putting a question mark after it:
This rule reduces the last vowel in a word to a schwa, even if there's a consonant after it.
If the language has a more complex syllable structure though, this won't be enough:
Instead, use the repeater *
:
If the rule only applies if there's at least one copy, use the one-or-more repeater +
:
Lexurgy supports a few more kinds of repeaters with more precise limits on the number of copies they match.
If you want to use one of these operators on a sequence of sounds, you have to put the sequence in parentheses:
Copying Sounds
Sometimes it's useful to copy sounds from one place to another. For example, you might want to apply gemination (duplication of a sound) or metathesis (switching of sounds).
To copy a sound, put a capture variable immediately after the pattern that matches it. A capture variable looks like a dollar sign followed by a number: $1
, $2
, etc. Once a sound has been captured, you can use the capture variable alone to produce or recognize a copy of the sound.
This rule applies gemination in stop-stop clusters, turning the first stop into a copy of the second:
This rule applies metathesis to stop-fricative sequences:
This rule uses a capture variable in the environment to recognize a geminate:
This rule uses a bare capture variable on the left side of the rule to remove gemination (degemination):
"And" Rules
You can force Lexurgy to match multiple criteria on the same segment using an "and" rule (or intersection), joining the criteria with the &
symbol. You can use this, for example, to match only the segments in common between two classes:
You can use &!
to match only sounds that match the first criterion but don't match the second: