3 ms·
#from http://goo.gl/6U7f3 http://goo.gl/6U7f3 count syllables with nltk from nltk.corpus import cmudict d = cmudict.dict() syllables = [len(list(y for y in x
by gourneau 16y ago
#from http://goo.gl/6U7f3 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"]]
- deleted 16y ago[deleted]
- endtime 16y agoDid you read the link? >CMU's Pronouncing Dictionry (http://www.speech.cs.cmu.edu/cgi-bin/cmudict?in=fire 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.