module SadPanda

SadPanda main module

Has the polarity for all the words

Constants

VERSION

Public Class Methods

emotion(text) click to toggle source

this method returns the best-fit emotion for the status message

# File lib/sad_panda.rb, line 12
def self.emotion(text)
  # get the emotion for which the emotion score value is highest
  SadPanda::Emotion.new(text).call
end
polarity(text) click to toggle source

this method returns the polarity value for the status message (normalized by the number of 'polar' words that the status message contains)

# File lib/sad_panda.rb, line 20
def self.polarity(text)
  # get the polarity for which the polarity score value is highest
  SadPanda::Polarity.new(text).call
end