words.syllables.Syllable

words.syllables.Syllable(self, children=[], txt=None, ipa=None, parent=None, text=None, key=None, **kwargs)

Represents a syllable in a word.

Attributes: prefix (str): Prefix for the syllable. child_type (str): Type of child entities (Phoneme).

Attributes

Name Description
coda Get the coda of the syllable.
has_consonant_ending Check if the syllable ends with a consonant.
has_dipthong Check if the syllable contains a diphthong.
is_heavy Check if the syllable is heavy.
is_stressed Check if the syllable is stressed.
is_strong Check if the syllable is strong.
is_weak Check if the syllable is weak.
nucleus Get the nucleus of the syllable.
num_vowels Get the number of vowels in the syllable.
onset Get the onset of the syllable.
rime Get the rime of the syllable.
stress Get the stress level of the syllable.

Methods

Name Description
rime_distance Calculate the rime distance between this syllable and another.

rime_distance

words.syllables.Syllable.rime_distance(syllable)

Calculate the rime distance between this syllable and another.

Args: syllable: The syllable to compare with.

Returns: The rime distance as a float.