StringTools - Maple Programming Help

Home : Support : Online Help : Programming : Names and Strings : StringTools Package : English Text : StringTools/SyllableLength

StringTools

 SyllableLength
 compute the number of syllables in an English word

 Calling Sequence SyllableLength( word )

Parameters

 word - Maple string

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{SyllableLength}\left("every"\right)$
 ${3}$ (1)
 > $\mathrm{SyllableLength}\left("any"\right)$
 ${2}$ (2)
 > $\mathrm{SyllableLength}\left("doctor"\right)$
 ${2}$ (3)
 > $\mathrm{SyllableLength}\left("antidisestablishmentarianism"\right)$
 ${10}$ (4)