Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Syllable Counter
import curses
from curses.ascii import isdigit
import nltk
from nltk.corpus import cmudict
d = cmudict.dict()
def nsyl(word):
return [len(list(y for y in x if isdigit(y[-1]))) for x in d[word.lower()]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment