Hacker News new | ask | show | jobs
by anonfunction 4254 days ago
I tend to agree with you, do you know of any software projects to programmatically determine syllables?
1 comments

Couldn'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()]]