1Lingua::EN::Syllable(3)User Contributed Perl DocumentatioLningua::EN::Syllable(3)
2
3
4

NAME

6       Lingua::EN::Syllable - count the number of syllables in English words
7

SYNOPSIS

9         use Lingua::EN::Syllable;
10
11         $count = syllable('supercalifragilisticexpialidocious'); # 14
12

DESCRIPTION

14       Lingua::EN::Syllable::syllable() estimates the number of syllables in
15       the word passed to it.
16
17       Note that it isn't entirely accurate...  it fails (by one syllable) for
18       about 10-15% of my /usr/dict/words.  The only way to get a 100%
19       accurate count is to do a dictionary lookup, so this is a small and
20       fast alternative where more-or-less accurate results will suffice, such
21       as estimating the reading level of a document.
22
23       I welcome pointers to more accurate algorithms, since this one is
24       pretty quick-and-dirty.  This was designed for English (well, American
25       at least) words, but sometimes guesses well for other languages.
26

KNOWN LIMITATIONS

28       Accuracy for words with non-alpha characters is somewhat undefined.  In
29       general, punctuation characters, et al, should be trimmed off before
30       handing the word to syllable(), and hyphenated compounds should be
31       broken into their separate parts.
32
33       Syllables for all-digit words (eg, "1998";  some call them "numbers")
34       are often counted as the number of digits.  A cooler solution would be
35       converting "1998" to "nineteen eighty eight" (or "one thousand nine
36       hundred eighty eight", or...), but that is left as an exercise for the
37       reader.
38
39       Contractions are not well supported.
40
41       Compound words (like "lifeboat"), where the first word ends in a silent
42       'e' are counted with an extra syllable.
43

SEE ALSO

45       Lingua::Phonology - a framework of classes that provide "an object
46       model for lingistic phonology and sound change".  That includes
47       syllables, and it looks like you can use it to get syllables for words,
48       but from a quick skim of the doc I can't see exactly how.
49
50       Text::Info - a new module (as of late 2015) that provides information
51       about text in Germanic languages, including syllable count.
52

REPOSITORY

54       <https://github.com/neilb/Lingua-EN-Syllable>
55
57       This software is copyright (c) 1999 by Greg Fast <gdf@imsa.edu>
58
59       This is free software; you can redistribute it and/or modify it under
60       the same terms as the Perl 5 programming language system itself.
61

AUTHOR

63       Greg Fast (gdf@imsa.edu)
64
65
66
67perl v5.30.0                      2019-07-26           Lingua::EN::Syllable(3)
Impressum