compute the number of syllables in an English word
SyllableLength( word )
The SyllableLength(word) command computes the morphological syllable length of a word, using an algorithm suitable for the English language. The value returned is a positive integer.
The morphological syllable length is defined to be the number of vowel-consonant changes in word. (Note that this may not agree with the lexical syllable length found in dictionaries.) The syllable length of a nonempty word is always greater than or equal to one. A trailing letter `y' increases the syllable length by one. The letter `y' is regarded as a vowel when it follows a consonant.
Although a value is computed for any non-empty input string word, the result is meaningful only for valid English language words (or words in similar languages). In particular, the input must be pronounceable to ascribe any meaning to its syllable length.
All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
Download Help Document