Sha256: 669ef71a4bf6a57056a47aa727b8609906709428849333a7d77177bf399513c7
Contents?: true
Size: 753 Bytes
Versions: 1
Compression:
Stored size: 753 Bytes
Contents
require 'sad_panda/bank/emotions' require 'sad_panda/bank/polarities' require 'sad_panda/bank/stopwords' require 'sad_panda/emotion' require 'sad_panda/polarity' require 'sad_panda/helpers' require 'lingua/stemmer' # SadPanda main module module SadPanda # this method returns the best-fit emotion for the status message def self.emotion(text) # get the emotion for which the emotion score value is highest SadPanda::Emotion.new(text).call end # this method returns the polarity value for the status message # (normalized by the number of 'polar' words that the status # message contains) def self.polarity(text) # get the polarity for which the polarity score value is highest SadPanda::Polarity.new(text).call end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sad_panda-1.1.0 | lib/sad_panda.rb |