Strange Behaviour with optional categories.
I've defined categories C, V and D, and I'm trying to institute a change across syllable boundaries.
I've used a rule:
w/r/w(V)(D)(C*)_
This doesn't work.
If I use (V*) it works fine. If use C* it also works. But as soon as I put the C* into an optional category, it doesn't work. When I try to work around it by using ((C)*) I get a timeout error.
Unfortunately that information isn’t quite enough for me to diagnose the problem… could you please give me a set of rules that I can run myself (including definitions of C, V, D), along with some sample words and the expected output?
Actually — never mind, I think I recognise this issue. What happens is that C* already matches zero or more repetitions of C, so putting it in brackets is redundant. Unfortunately Brassica doesn’t currently recognise the redundancy, and goes into an infinite loop. You should be able to fix the issue by just removing the brackets: w / r / w (V) (D) C* _.
(This issue was previously reported here: https://verduria.org/viewtopic.php?p=87941#p87941. Of course, I wouldn’t have expected you to see that!)
Ah, thanks for your response! That makes perfect sense, and it's great to know about the forum.
If you don’t mind, I’m going to re-open this… even though there’s a workaround, it is an issue that Brassica hangs in this situation, and it should be fixed.
Ah, actually, I'm glad you did, because I tried using C* without the brackets and it didn't work. For context, here's the categories:
categories C = p t k b d g f s sj v z zj h kh gh m n l r j w -Voice = p t k f s sj kh th +Voice = b d g v z zj gh dh +Fric1 = f th kh v dh gh -Fric = p t k b d g +Fric2 = f s sj v z zj kh gh h th dh
V = a e i u o á é í ú ó -High = a e á é +High = i u í ú -Short = a e i u o +Short = á é í ú ó
D = ai ae au ei ea eu ia ie iu ua ue ui end
Relevant multigraph rule is:
-x e i / ei
My sound change rule is:
w/r/w(V)(D)C*_
Actually, what I want is for the rule to match a /w/ followed exactly one of either V or D, and additionally any number of C. I've not got to figuring out how to match the V and D properly yet.
I'm inputting these words to test it:
twaintwa nwalwi pwinwu kwemwei
My outputs are:
twántwa nwalwi pwinwu kwemwia
My sound changes for diphthong have worked, but not the w > r rule.
This is actually expected behaviour (though a little subtle — it took me a minute or two to work out what’s going on). The category C itself contains ⟨w⟩, so C* will match all consonants up to and including the ⟨w⟩ which needs to change. The simplest fix is to explicitly exclude ⟨w⟩:
w / r / w (V) (D) [C -w]* _
Arguably the behaviour of * should be changed to make it more intuitive, but I’m not completely sure what a better approach would be…
Also, a couple of general comments:
- You don’t need to create the multigraph explicitly, because you specified it in your first
categoriesblock. (See the documentation for details.) - It doesn’t make sense to define a category
+Fric1without a corresponding-Fric1. Similarly for+Fric2and-Fric.
Thanks! That worked perfectly.
I missed that about the multipgraphs, thanks.
About the +Fric1 etc: a Fricative/Stop divide to help with lenition rules, but there are fricatives that don't participate in those rules, though nonetheless form the conditions that trigger other changes Would it make sense to have +Fric1, -Fric1, and simple Fricative category, without making it featural?
Would it make sense to have +Fric1, -Fric1, and simple Fricative category, without making it featural?
Whatever works best in the context of your sound changes. Though if they’re not featural, you don’t need to use that syntax at all: you could just call them plain Fric, Fric1, Fric2.