Page 1 of 1
SCA2 issue
Posted: Mon Aug 03, 2026 10:07 pm
by Emily
i'm having an issue i haven't been able to troubleshoot with sca2. with the categories
C=mnpbtdɟkgþfvszðɣhljrwʦʣxçʧʤʃʒɲʝŋcɟʎ
R=tdnrszl
and the rule
n/l/#(C)(C)(C)R_
i expect the word
zna to turn into
zla, but instead it's remaining
zna. the only way i can get it to work is if i remove all the optional consonants from the environment:
n/l/#R_
but shouldn't it recognize that the consonants are optional?
Re: SCA2 issue
Posted: Mon Aug 03, 2026 10:52 pm
by zompist
Since I wrote the program more than a decade ago, I'm afraid the general answer is "I dunno."
After skimming the code... I'm not quite sure how the optional classes work, but I think it's "stupidly". The thing is, it doesn't look ahead. So if it's processing that (C)(C)(C), it is probably taking the z as one of the (C)'s, not knowing that it "should" reserve it for the R instead.
My approach with rules I can't make work is usually to make more specific ones. E.g.
n/l/#CCCR_
n/l/#CCR_
n/l/#CR_
n/l/#R_
I tested that but haven't looked for a better way-- it depends on what other rules you have.
Re: SCA2 issue
Posted: Tue Aug 04, 2026 2:25 am
by Emily
i will do that then, thank you!
Re: SCA2 issue
Posted: Tue Aug 04, 2026 6:39 am
by bradrn
zompist wrote: ↑Mon Aug 03, 2026 10:52 pm
After skimming the code... I'm not quite sure how the optional classes work, but I think it's "stupidly". The thing is, it doesn't look ahead. So if it's processing that (C)(C)(C), it is probably taking the z as one of the (C)'s, not knowing that it "should" reserve it for the R instead.
My own
Brassica works the same way — in fact, this precise problem is a fairly frequently reported ’issue‘. If you have the right mental model it makes sense, but it trips people up often enough that I’ve been meaning to find a more sensible implementation.
EDIT: Just tested Emily’s sound change and in fact it
does work as written in Brassica. So I was misremembering. A very similar issue does exist in Brassica, but mostly it concerns the Kleene star rather than optional categories (
https://github.com/bradrn/brassica/issues/5).