Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from Dictionary import stressedipa2stress,getStrengthStress
from Syllable import Syllable
stress=stressedipa2stress(stressedipa)
(prom_stress,prom_strength)=getStrengthStress(stress)
syllphons=[tuple(child.phonemes()) for child in self.children]
syllbodies = self.syllableBodies()
sylls=[]
for i in range(len(syllphons)):
syllbody=syllbodies[i]
syll=Syllable((syllbody,prom_strength[i],prom_stress[i]),lang=self.lang,token=self.sylls_text[i])
sylls.append(syll)
word=Word(self.token,sylls,self.sylls_text)
word.ipa=stressedipa
word.stress=stress
word.lang=self.lang
# when is word broken?
if not word.ipa:
word.broken=True
return word