I want to write an algorithm to calculate the number of syllables in a word. This process is an automated one that will be run on an entire dictionary so manually counting the number of breaths, chin movements etc. as mentioned in other questions won't scale. I also don't want to visit a website like howmanysyllables to input the word because I don't want to depend on a non free and open source system.

To get around tricky words like "Wednesday", I thought it would be easier to use the IPA transcription of words instead. I have the IPA transcription for all words in my downloaded dictionary but to my dismay I discovered there seems to be no surefire method of counting syllables.

Consider these two transcriptions to IPA:

pronunciation: pɹəˌnʌn.siˈeɪ.ʃən
conscientious: ˌkɒnʃiˈɛnʃəs

For the IPA word "pronunciation", lower apostrophe, upper apostrophe and period can be used to tell where the syllable breaks occur. The IPA word for "conscientious" only seems to strictly indicate a single break. You could say the "ʃ" indicates a syllable break but I worry this isn't the case for all words.

Is there a list of rules that define syllable breaks in US English for IPA transcriptions?

  • 1
    You're not going to be able to find rules for splitting syllables. You will need to find a different set of IPA transcriptions. Dictionaries like Dictionary.com use IPA and mark all the syllables with a combo of stress marks + spaces. You may not be able to find an IPA list/API for free, so maybe you should consider using a different transcription system. – Laurel Jun 4 '17 at 20:58
  • That's disheartening. I'm new to this area but I thought this would have been a solved problem. Thanks for the heads up. – Phlox Midas Jun 4 '17 at 21:02
  • 3
    Bear in mind that some words have a different number of syllables for different speakers. – oerkelens Jun 4 '17 at 21:18
  • 1
    Thanks to everyone for their helpful comments. I think I'll do done more research before tackling this problem, the complexity of which I seem to have underestimated. – Phlox Midas Jun 5 '17 at 10:37
  • 1
    In the end I did use the CMU dictionary. One syllable for each vowel phone in a word. – Phlox Midas Apr 27 '18 at 8:09

Here's a spreadsheet with English words, IPA and syllable data https://docs.google.com/spreadsheets/d/1EfFhhC7kcTzB8c2UhAC53txRiTLKl3R9C2AM7ee0AVM/edit#gid=104606017

So after coming across this question and wanting to know the answer myself, I managed to pull together a few different sources of information into one Excel spreadsheet, and get data for just over 31,000 words with both their IPA pronunciations, and the number of syllables. I also found some frequency data, which can be used to naively split the words into deciles, according to how often the words are roughly used - meaning that you can sort the words by both syllable length and frequency of use (which is a very rough measure of complexity.)

Caveat: the pronunciation data I've pulled is from UK English. I pulled it from a GitHub repo containing IPA information for many languages, which also contains a file containing US English words and their pronunciations, linked here.

I haven't integrated it myself because I only need the UK data*, but you can pull the data into Excel fairly easily - the fields are split by whitespace, so Text-to-columns should separate the IPA from words. If you're comfortable with Excel then it should be fairly simple to combine this with the other data to get a list of all US English pronunciations and their syllable counts.

The rest of the sources for the data are linked in the spreadsheet itself.

* Also, I did try to add in the US Word data to the Google Sheets, but Sheets complained that this would exceed the cell limit. I put together this project based on UK data before I realised that you're probably from the US, and built all the formulas around it, so it would take a bit of unpicking for me to switch it over fully. I might come back to it another day. Hope this is still of some use to you.

  • I don't know how to use it, but can you find the number of syllables in 'hour' and 'power' (British English)? – Decapitated Soul Sep 25 '20 at 17:16
  • Sure, just go to the "Words - All" spreadsheet and search for the term you're interested in. It looks like "hour" is classed as one syllable and "power" as two syllables. Which I think makes sense, as "power" starts a second syllable with the /w/ onset, whereas "hour" just has a triphthong vowel nucleus. – Lou Sep 25 '20 at 17:19
  • Interesting. Do you pronounce 'hour' with one syllable or two? – Decapitated Soul Sep 25 '20 at 17:20
  • See my edited comment, but yeah I would pronounce power with two syllables usually. – Lou Sep 25 '20 at 17:20

How to calculate number of syllables in a word using only the IPA (International Phonetic Alphabet) spelling?

You can, but it doesn't always work and as oerkelens said in the comments:

Bear in mind that some words have a different number of syllables for different speakers.

The Oxford English Dictionary defines a syllable as:

A vocal sound or set of sounds uttered with a single effort of articulation and forming a word or an element of a word; each of the elements of spoken language comprising a sound of greater sonority (vowel or vowel-equivalent) with or without one or more sounds of less sonority (consonants or consonant-equivalents).

This is a technical definition of a syllable. From the above definition, a syllable can also be defined as a set of (one or more) sounds including at least one vowel-like sound and possibly with other consonant-like sounds surrounding it.

Every syllable has a nucleus which constitutes a sonority peak.

The sonority values of segments are determined by Sonority Hierarchy. A typical sequence of sonority values is:
Vowel > Glide > Liquid > Nasal > Fricative > Affricate > Plosive

Vowels are the most sonorous and obstruents are the least sonorous sounds. The above values can be represented in a sonority curve. Take for example the word 'crime'. If 'crime' is pronounced [kɹaɪm], then the sonority curve for 'crime' would be:

Sonority curve for 'crime'

As you can see, there's only one peak (red), hence one syllable. (Diphthongs = monopthongs)

We also have syllabic consonants that form a syllable on their own. The most common syllabic consonants are /m/, /n/ and /l/ (and sometimes /r/ in American English).

Moving on to the original question...

Pronunciation /pɹəˌnʌn.siˈeɪ.ʃən/

In this case, the /n/ is syllabic ([n̩]). Syllabicity can also be denoted by a superscript schwa (/ə/) or a parenthesised schwa (ə) before the syllabic consonant), so 'pronunciation' can also be transcribed /pɹəˌnʌn.siˈeɪ.ʃən/. The /siˈeɪ/ is pronounced more like [sijeɪ] i.e. there's an intrusive /j/ (or the /e/ is non-syllabic) in it, so 'pronunciation' can be transcribed narrowly as [pɹəˌnʌn.si.jeɪ.ʃn̩]. Now let's make a sonority curve for it:

Sonority curve for 'pronunciation'

There are five peaks (indigo) here, hence five syllables. 'Conscientious' is almost the same, insert a /j/ between /i/ and /ɛ/ and make four peaks.

So it's possible to find the number of syllable from the IPA transcription.

  • I think that this is an excellent and well researched answer to the question of how you can work out the number of syllables in a word from the IPA. I'd be interested to see if this approach could be used in an algorithm as OP wanted. Perhaps a naive algorithm would find all the vowel nuclei (somehow differentiating monophthongs and diphthongs) and count them. Maybe? – Lou Sep 26 '20 at 9:54
  • @Lou: I don't think so. I only read the title and examples. My answer only addresses the title and examples. :) – Decapitated Soul Sep 26 '20 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.