Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _getSyllableNucleus(phoneList):
'''
Given the phones in a syllable, retrieves the vowel index
'''
cvList = ['V' if isletool.isVowel(phone) else 'C' for phone in phoneList]
vowelCount = cvList.count('V')
if vowelCount > 1:
raise TooManyVowelsInSyllable(phoneList, cvList)
if vowelCount == 1:
stressI = cvList.index('V')
else:
stressI = None
return stressI
def __init__(self, syllable, syllableCVMapped):
super(TooManyVowelsInSyllable, self).__init__()
self.syllable = syllable
self.syllableCVMapped = syllableCVMapped