Syllabification (counting syllables) is an algorithmic approach by which a word can be broken into smaller parts representing unique phonetic components. The syllable counting calculator on this page generates a rough count of the number of syllables in words, paragraphs, haikus, sonnets, or just about anything else one can imagine.
This syllable counter uses a very rudimentary algorithm that is likely inaccurate for edges cases, non-English languages, and many untested cases. Counting syllables in words can be useful for a number of natural languages processing tasks. In fact, there have been robust syllable counting algorithms developed for just this task.
Below are some discussions of several syllable counting solutions one can integrate into projects and applications for more robust, accurate, and broadly applicable use cases.
Languages only contain so many words — even the complex ones. Most dictionaries such as Webster’s Dictionary provide dot-delimited or hyphen-delimited syllable separations for words. For example, the word
syllable can be found listed along with its’ destructured syllabic representation
syl·la·ble illustrating 3 separate components. One can simply count the number of delimiters and add 1. For example, the above example has two
·‘s so the total syllable count would be
2 + 1 = 3.
TeX (pronounce Lu-Tek) is a document typesetting system first developed by Donald Knuth in the late 1970s. Within this system, complex mathematical equations can be represented in visually contextual ways. Things like sigma notation, greek letterings, and fractional notations aren’t limited to the confines of simple ASCII table characters.
TeX has a hyphenation system based largely on the Ph.D. dissertation by Franklin Liang while at Stanford 1. Liang’s algorithm was able to achieve a near 90% accuracy with as few as 14 words in a referenced “exceptions dictionary” meaning those terms were manually overridden.
The algorithm behind this hyphenation system allows one to count the syllables in a word by getting the count of hyphens and adding 1, similar to the dictionary counting method above. The main difference — this is an algorithmic approach requiring no pre-exiting knowledge of preferred hyphenation other than the exceptions dictionary.
- Franklin Mark Liang. 1983. “Word hy-phen-a-tion by com-put-er (hyphenation, computer)”. Ph.D. Dissertation. Stanford University, Stanford, CA, USA. https://www.tug.org/docs/liang/liang-thesis.pdf.