def esp_syllabify(word, stress=None): """Syllabify the given word using the Cuayahuitl (2004) algorithm.""" # Make an onset instance onsets = EspOnsets() # Call the syllabifier first_sylls = syllabify(word, onsets, ESP_VOWELS, True) # Now do a second pass for vowels that need to be broken up second_sylls = esp_split_vowels(first_sylls, stress) return second_sylls
def eng_syllabify(phonemes): """Syllabify a sequence of phonemes using max onset and a gold set of onsets.""" return syllabify(phonemes, ENG_ONSETS, ENG_VOWELS)