예제 #1
0
 def __init__(self, word):
     self.word = word
     self.syllables = make_syllables(word)
     self.split_sylls = [split_syllable(syll) for syll in self.syllables]
     self.weights = make_weights(self.split_sylls)
     self.sonorities = make_sonorities(self.split_sylls)
     self.stresses = make_stresses(self.weights)
예제 #2
0
 def __init__(self, word):
     self.word = word
     self.syllables = make_syllables(word)
     self.split_sylls = [split_syllable(syll) for syll in self.syllables]
     self.weights = make_weights(self.split_sylls)
     self.sonorities = make_sonorities(self.split_sylls)
     self.stresses = make_stresses(self.weights)
예제 #3
0
 def __init__(self, word):
     if type(word) != unicode:
         word = unicode(word, 'utf-8')
     self.word = word
     self.syllables = make_syllables(word)
     self.split_sylls = [split_syllable(syll) for syll in self.syllables]
     self.weights = make_weights(self.split_sylls)
     self.sonorities = make_sonorities(self.split_sylls)
     self.stresses = make_stresses(self.weights)
     self.lexical = is_lexical(word)
     self.str = annotation_string(self)[1:-1]