3 ms·
http://www.nltk.org/ http://www.nltk.org/
by spyspy 12y ago
http://www.nltk.org/ http://www.nltk.org/
- anonfunction 12y agoCouldn't find anything that says it officially supports counting of syllables but stackoverflow provided this possible solution: from nltk.corpus import cmudict d = cmudict.dict() def nsyl(word): return [len(list(y for y in x if y[-1].isdigit())) for x in d[word.lower()]]