def _count_syllables(word):
 n = 0
 p = False
 for ch in ((word.endswith('e') and word[:(-1)]) or word):
  v = (ch in VOWELS)
  n += int((v and (not p)))
  p = v
 return n

def _count_syllables ( word ) : n = 0 p = False for ch in ( ( word . endswith ( 'e' ) and word [ : ( - 1 ) ] ) or word ) : v = ( ch in VOWELS ) n += int ( ( v and ( not p ) ) ) p = v return n
returns the estimated number of syllables in the word by counting vowel-groups .