code: function unit(input){
    var word = S(input).stripPunctuation().s.toLowerCase().trim();
    if(!word){ return 0; }
    if(word.length <= 3) { return 1; }
    word = word.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, '');
    word = word.replace(/^y/, '');
    var syllbs = word.match(/[aeiouy]{1,2}/g);
    return (syllbs ? syllbs.length : 0);
  }
docs: from: http://stackoverflow.com/questions/5686483/how-to-compute-number-of-syllables-in-a-word-in-javascript