lib/sad_panda.rb in sad_panda-0.2.0 vs lib/sad_panda.rb in sad_panda-0.2.1

- old
+ new

@@ -4,13 +4,10 @@ require_relative './sad_panda/emotions/stopwords.rb' require 'lingua/stemmer' module SadPanda - attr_accessor :message, :verbose - attr_reader :stemmer - # this method reads the text of the status message # inputed by the user, removes common english words, # strips punctuation and capitalized letters, isolates # the stem of the word, and ultimately produces a hash # where the keys are the stems of the remaining words, @@ -83,18 +80,18 @@ end end # return an emotion_score_hash to be processed by emotion # get clue from any emoticons present if (@happy_que && @sad_que) - return "uncertain" + return "ambiguous" elsif @happy_que return "joy" elsif @sad_que return "sadness" else ## 0 if unable to detect emotion if emotion_score == {} - return "uncertain" + return "ambiguous" else score = emotion_score.max_by{|k, v| v}[0] end score end