News for hackers. Stuff that matters.
Re:Counting syllables in "fire" and other words by gourneau on Tuesday December 21, 2010 @10:12AM (#2027992)
#from http://goo.gl/6U7f3 count syllables with nltk

from nltk.corpus import cmudict

d = cmudict.dict()

syllables = [len(list(y for y in x if y[-1].isdigit())) for x in d["count"]]

Re:Counting syllables in "fire" and other words by endtime on Tuesday December 21, 2010 @01:16PM (#2028701)
Did you read the link?

>CMU's Pronouncing Dictionry (http://www.speech.cs.cmu.edu/cgi-bin/cmudict?in=fire), however, indicates two possible pronunciations (F AY ER | F AY R), the first of which seems to indicate a two-syllable word.