def-gthill / lexurgy

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

Stress diacritic replaces vowel by the first vowel symbol declared #9

Closed chouwl closed 3 years ago

chouwl commented 3 years ago

I've been trying to run a simple file on Lexurgy 0.8.2:

Feature Type(*cons, vowel)
Feature Stress(*unstressed, stressed)

Diacritic ' [stressed]

Symbol æ [vowel]
Symbol ɛ [vowel]
Symbol i [vowel]
Symbol ə [vowel]
Symbol o [vowel]

stress-first-syllable [vowel]:
[] => [stressed] / $ _

With the input əonə I get æ'onə, which is weird because it shouldn't replace the vowel, but only add the stress diacritic. If I make the symbol o the first one declared, then I get o'onə. I would expect to get ə'onə.

def-gthill commented 3 years ago

Thanks for trying Lexurgy! All the symbols you declare have to have some distinguishing feature; you can't have a bunch of different symbols with the exact same matrix, like "[vowel]". Of course, Lexurgy doesn't actually check this, it just silently does something unexpected behind the scenes, so I'm keeping this issue open until I can make it do something more reasonable.

To make this work, add features to each vowel to make them distinct. For example:

Feature Type(*cons, vowel)
Feature Height(low, mid, high)
Feature Frontness(front, central, back)
Feature Stress(*unstressed, stressed)

Diacritic ' [stressed]

Symbol æ [low front vowel]
Symbol ɛ [mid front vowel]
Symbol i [high front vowel]
Symbol ə [mid central vowel]
Symbol o [mid back vowel]

Let me know if you have further questions!

chouwl commented 3 years ago

That makes perfect sense. 👍 Until you modify that behaviour, would it be worth a note in the documentation?

def-gthill commented 3 years ago

I've added a note to the documentation. My current build now reports an error message on your input: "The symbols æ and ɛ both have the matrix [vowel]; add features to make them distinct." This will be included in the 0.8.3 release. Thanks for reporting!