DorotheaBrooke wrote: ↑Tue Sep 16, 2025 12:21 pm
Quick question - I don't have any real programming experience and had a little trouble figuring out how to do this from the documentation (partly because I have a cold.) I'm working on a series on sound changes for one of the Kuzitic branches which sees a two tone system develop into a pitch accent system, so I need changes that can do things like "turn all but the rightmost high tones in the word into low tones" or "turn the rightmost syllable in a word with only low toned syllables into a high tone." Where would I get started doing something like that?
For this, I'm assuming your high tone vowels are in a category called
+high and low tone in one called
-high, and a syllable structure of
(C)V. It obviously doesn't matter but it allows me to test and give valid rules to you in the simplist formst possible¹.
The first rule is what wildcard matching is for. When a character in the environment is preceded by a the wildcard
^, brassica moves rightwards across the word from the target to the end until it finds something matching the wildcarded character. It can therefore be written as
+high / -high / _ ^+high, i.e. a high tone vowel will be changed to a low tone vowel if it is followed by a high tone vowel anywhere in the word.
The second one is more complicated, but can be solved using the same principle. The differences from the previous is that you want the sound change to happen only if the wildcard
doesn't match, and that you need the matching to occur leftwards from the target. The first can be solved by putting the wildcard in an exception instead ofnthe environment, and the second can be faked by adding the
-rtl flag, which makes brassica perform the soundchange in reverse. Putting this together, the rule is
-rtl -high / +high / _ # // ^+high _, i.e. working backwards, brassica will change a low toned vowel to a high toned one if it occurs word finally and isn't followed (or preceded, since this change is working backwards) by a high tone vowel anywhere in the word.
I hope this helps and is the right level of explanation for you.
¹ I tested this with the below
Code: Select all
extra k
categories
-high = a
+high = á
V = &&high
auto -high
end
+high / -high / _ ^+high
-rtl -high / +high / _ # // ^+high _
Output:
ákákáká → akakaká [rule 1 test]
akakaka → akakaká [rule 2 test]
akákaka [none applied test]