StringTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Parameters

Description

Examples

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.

Examples

withStringTools:

SyllableLengthevery

3

(1)

SyllableLengthany

2

(2)

SyllableLengthdoctor

2

(3)

SyllableLengthantidisestablishmentarianism

10

(4)

See Also

string

StringTools