def-gthill / lexurgy

A high-powered sound change applier
GNU General Public License v3.0
44 stars 5 forks source link

Sound laws not applying when they should #10

Closed Technomancer00 closed 3 years ago

Technomancer00 commented 3 years ago

I am writing a sound change that is supposed to delete vowels between two unvoiced consonants unless they are stressed or are long, but the unvoiced glottal stop is not taken to account for this. The glottal stop is also not taken to account for the next sound change, which is supposed to turn unvoiced consonants into ejective consonants before a glottal stop. I will paste my entire code here so you can pick through and see if I made an error or if there's a bug.

Feature Type(cons, vowel, obstruent, resonant, glide) Feature Place(labial, coronal, dorsal, glottal) Feature Manner(nasal, stop, affricate, fricative, approximant) Feature Height(high, mid, low) Feature Depth(front, central, back) Feature Stress(stressed, unstressed) Feature Voice(voiced, unvoiced, aspirated, ejective) Feature Length(short, long) Feature Nasality(*oral, nasalized)

Diacritic ʰ [aspirated] Diacritic ’ [ejective] Diacritic ́ [stressed] Diacritic ː [long]

Proto Sata'ilun

Symbol a [low central vowel]
Symbol i [high front vowel]
Symbol u [high back vowel]
Symbol ā [long low central vowel]
Symbol ī [long high front vowel]
Symbol ū [long high back vowel]
Symbol m [labial nasal]
Symbol n [coronal nasal]
Symbol p [unvoiced labial stop]
Symbol t [unvoiced coronal stop]
Symbol k [unvoiced dorsal stop]
Symbol ' [unvoiced glottal stop]
Symbol s [unvoiced coronal fricative]
Symbol h [unvoiced glottal fricative]

Intermediate symbols

Symbol b [voiced labial stop]
Symbol d [voiced coronal stop]
Symbol ɡ [voiced dorsal stop]

deromanizer: y => j ā => aː ī => iː ū => uː ' => ʔ

vowel-loss: [vowel] => * / [unvoiced] _ [unvoiced]

intervocalic-stop-voicing: [unvoiced stop !glottal] => [voiced] / [vowel] _ [vowel]

ejectives: [unvoiced] => [ejective] / _ [glottal stop]

romanizer: j => y aː => ā iː => ī uː => ū ʔ => ' [stressed vowel] => [vowel]

It outputs the following: mitúpaw => mitpaw muyháy tulímpi púyam tálsan walkuyuymánwa niwahitáta => niwahtáta námu kanimawpíma kanlaw'iman āhimul usūmilti inī ālu ūyalu lunkūmia yāmūimyana ihakiyukun => ihkiyuɡun mūlka layun miukā => miuɡā al ta'ínki ta'an

def-gthill commented 3 years ago

Thanks for trying Lexurgy! The problem is that you've declared ' [unvoiced glottal stop], but right off the bat you turn all your apostrophes into ʔ, and ʔ isn't declared. If you declare ʔ [unvoiced glottal stop] instead, the rule works as expected.

However, your example does point out some (unrelated) changes I need to make. In the current version, most keywords have to be capitalized, including "Romanizer" and "Deromanizer", so yours are actually just ordinary rules that happen to have the names "romanizer" and "deromanizer". This isn't noticeable in most cases, but if you tried adding an intermediate romanizer with a lowercase "r", it wouldn't work at all. I'm thinking this is overly picky (and not explicitly stated in the documentation), so I'll make keywords case-insensitive.

It gets worse, though. If you capitalize the keywords, you'll get an error message: Feature matrix [vowel] isn't allowed in a romanized context. Welcome to the confusing semantics of romanizers and deromanizers! For now, just add the following to the end of the deromanizer:

Then:
* => *

This is a pretty unintuitive workaround, so my next task is to clean up the behaviour of romanizers and deromanizers.

Technomancer00 commented 3 years ago

Thank you! I realized that after I posted it. I'm glad I pointed out another unrelated issue though.