syllable_list = []
syllable = self.syllables_values[0][0] // start syllable with first phoneme
for trigram in zip(*[self.syllables_values[i:] for i in range(3)]):
prev_value = trigram[0][1] // sonority of previous phoneme
focal_value = trigram[1][1] // sonority of focal phoneme
next_value = trigram[2][1] // sonority of following phoneme
After Change
syllable_list = []
syllable = syllables_values[0][0] // start syllable with first phoneme
for trigram in ngrams(syllables_values, n=3):
phonemes, values = zip(*trigram)
// Sonority of previous, focal and following phoneme
prev_value, focal_value, next_value = values
// Focal phoneme.
focal_phoneme = phonemes[1]