def-gthill / lexurgy

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

Propagate apparently doesn't work if the match is <syl> #38

Closed sievertst closed 3 years ago

sievertst commented 3 years ago

Rules marked as propagate are only applied once if the match is <syl> (and further narrowing of the match such as <syl>&[unstressed] makes no difference either).

Minimal working demonstration adapted from the Advancedish example:

Feature type(*cons, vowel)

Feature (syllable) stress(*unstressed, secondary, primary)

Diacritic ˈ (before) [primary]
Diacritic ˌ (before) [secondary]

Symbol a [vowel]

Syllables:
  [cons]? [vowel]

primary-stress-second-last-syllable:
  <syl> => [primary] / _ <syl> $

add-secondary-stress propagate:
  # This rule appears to be applied only once despite propagate
  <syl> => [secondary] / _ <syl> {[primary], [secondary]}

Testinput: papapapapapa output: pa.pa.ˌpa.pa.ˈpa.pa expected: ˌpa.pa.ˌpa.pa.ˈpa.pa (with secondary stress on the first syllable)

The issue isn’t related to the number of syllables either; you always get only one secondary stress, regardless of the number of syllables in the input (as long as that number is ≥4 obviously).

def-gthill commented 3 years ago

Thanks for reporting. I'm taking a look.

def-gthill commented 3 years ago

This is fixed as of commit be8d1fef13a20758213259ed3db9f1b784104a94, and the fix will be included in the next version.