Sound change rules (also known as phonological rules) are mainly used in the Sound Change field and in custom affixes. This notation can also be used in the Custom Spelling field to mimic spelling idiosyncrasies of natural languages, and in illegal combinations field to prohibit combinations of phonemes.

A basic rule like a > e means change every a to e. Try it yourself:

InputRuleOutput
alabama a > e

You can also specify if the change should only happen in a particular environment: a > e / _b means change every a to e if it comes before a b. The / means "in the environment of" and _ signifies where the a is.

InputRuleOutput
alabama a > e / _b

Word boundary

# signifies a word boundary. Notice how the following pattern only changes the first a.

InputRuleOutput
alabama a > e / #_

Multiple symbols

Capture multiple symbols inside curly brackets, eg {b,m}:

InputRuleOutput
alabama a > e / _{b,m}
alabama {b,m} > p

Phoneme classes

Vulgar uses various uppercase abbreviations for classes of phonemes, such as C for "any consonant" or V for "any vowel":

InputRuleOutput
alabama a > e / C_

Here is a complete list:

SymbolMeaning
AAffricate
BBack vowel
CConsonant
DAny IPA letter (does not match diacritics)
ᴰ (superscript D)Any diacritic symbol
EFront vowel
FFricative
HLaryngeal
KVelar
LLiquid
MDiphthong
NNasal consonant
OObstruent
PLabial
QUvular
RSonorant/resonant
SStop
U or σSyllable
%Syllable boundary (includes beginning and end of word)
VVowel (including diphthongs)
WSemivowel
XAny phoneme
ZContinuant

Optional patterns

Round brackets makes a pattern optional:

InputRuleOutput
to god o > e / _(C)#

Adding a star symbol * means the optional pattern is repeatable, i.e. zero or more of the pattern:

InputRuleOutput
to gods o > e / _(C)*#

Null symbol

Null signifies nothing:

InputRuleOutput
alabama C > ∅

You can also literally write nothing: C >. Note that the null ∅ character (U+2205) should not be confused the Scandinavian letter Ø (U+00D8).

Infixes

The null symbol can be useful for inserting infixes into a certain position of the word:

InputRuleOutput
burro ∅ > it / _V#

Exceptions to rules

The ! symbol signifies an exception to a rule: m > n / !_e means m changes to n everywhere except before e. Similarly, m > n / !e_ means m changes to n everywhere except after e.

Exception rules can also be added to the end of a normal rule, eg: m > n / _e !s_ means m changes n before e, except after s.

Same phoneme in a class

There may be scenarios where you want to match two of the same phonemes from a class, e.g., between two of the same vowels. To do this, use the a matching subscript number (₁₂₃₄₅₆₇₈₉) after the uppercase class:

InputRuleOutput
mitigate t > d / V₁_V₁

Different numbers can signify that they are different phonemes. The following pattern matches two consonants in a row and swaps them:

InputRuleOutput
ask C₁C₂ > C₂C₁

For ease of typing, regular numbers also work, e.g. C1C2 > C2C1. You may also subscript a whole pattern by enclosing it in backtick (`) quotes:

InputRuleOutput
tada `CV`₁`CV`₂ > `CV`₂`CV`₁

Reduplication

Reduplication is a process in some languages where the whole word, or part of the word, is repeated exactly (or with a slight change). It often plays more of a grammatical function (such as forming the plural of a word) rather than being a global sound change process.

A quick-and-dirty rule to do a full reduplication is X(X)* > @@, where X* matches any number of any phoneme (the whole word), and @ replaces the match with itself (doubled @@):

InputRuleOutput
bye X(X)* > @@

Partial reduplication comes in many forms, and there a few strategies for expressing them as rules. The Pangasinan language (Philippines) may reduplicate the first CVC pattern:

InputRuleOutput
baley #CVC > @@

However, in a more complicated example, it repeats the first consonant only and first vowel. You could express this as being inserted at the beginning of the word with subscript numbers:

InputRuleOutput
plato ∅ > C₁V₁ / #_C₁C₂V₁

Dealing with stress symbols

Sound changes automatically ignore stress symbols, unless the rule intentionally includes stress. However for spelling rules, including stress in a rule automatically checks Make spelling rules sensitive to stress symbol option, which means you do need to be mindful of it, and potentially create a separate rule to delete stress symbols.

Some spelling systems mark stress on the vowel itself, such as with an acute accent, like á. To do this you need to account for zero or more consonants coming between the stress symbol ˈ and the vowel: ˈ(C)*_.

InputRuleOutput
ˈama ˈdrama draˈma a > á / ˈ(C)*_

Non-Latin alphabets

Custom spelling supports all Unicode alphabets and scripts, such as Japanese, Chinese, Cyrillic, Georgian and even Unicode Emojis.

Order of rules

The order of rules matter. Vulgar will find-and-replace the first rule to a word, then apply the next rule over the top of what it just did. This can be a problem if a IPA symbol appears in multiple patterns. For instance, the following ordering is problematic:

ʊ > u
aʊ > ow

The intent here is for the diphthong (as in the word "cow") to change to ow. However, a previous rule has already changed any ʊ (as in the word "put") to u, which means has already changed to au. The easiest solution is to reverse the order of the rules:

aʊ > ow
ʊ > u

Another solution is to use the exception ! symbol: ʊ > u / !a_.