Project

sad_panda

0.03
No commit activity in last 3 years
No release in over 3 years
sad_panda is a gem featuring tools for sentiment analysis of natural language: positivity/negativity and emotion classification.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0

Runtime

 Project Readme

SadPanda

sad_panda is a gem featuring tools for sentiment analysis of natural language: positivity/negativity and emotion classification.

Emotion Range: "anger", "disgust", "joy", "surprise", "fear", "sadness"

Polarity Range: 0 to 10

Installation

Add this line to your application's Gemfile:

gem 'sad_panda'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sad_panda

Usage

	require 'sad_panda'

	SadPanda.emotion('my lobster collection makes me happy!')
	=> :joy

	SadPanda.polarity('I love cactuses!')
	=> 10.0

	sad_panda = SadPanda::Emotion.new('my lobster collection makes me happy!')
	sad_panda.call
	sad_pands.scores = {:anger=>0, :disgust=>0, :joy=>1, :surprise=>0, :fear=>0, :sadness=>0, :ambiguous=>0}

	sad_panda.joy => 1
	sad_panda.fear => 0
	# same for all the other emotions

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request