Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sentimetnal

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentimetnal

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Sentimetnal

No, it's not a typo :grin:. According to Google Translate this is the Esperanto word for 'sentimental'.

Sentimetnal is a very simple sentiment analyzer based on Finn Årup Nielsen's AFINN word list.

It is basically a Ruby port of https://gist.github.com/fnielsen/4183541/ It returns a float for the sentiment strength of an input text.

Positive values are for a positive valence, negative values for a negative valence.

Installation

Add this line to your application's Gemfile:

gem 'sentimetnal'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sentimetnal

Usage

require 'sentimetnal'

analyzer = Sentimetnal::Analyzer.new
sentiment = analyzer.sentiment("The best & most delicious beef and friendly staff!" # 1.7677669529663687

sentiment.to_rating # 4

sentinment.to_emoji # :smile:

Contributing

I'd like to try translating the word list and prepare it for the use with other languages...

  1. Fork it ( https://github.com/[my-github-username]/sentimetnal/fork )
  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 a new Pull Request

Ruby NLP

Unfortunately Ruby does not provide something like NLTK. But there are some interesting gems and code. I'm compiling my favorite ones here

FAQs

Package last updated on 02 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc