Giter Site home page Giter Site logo

vadersharp's Introduction

VaderSharp. The best sentiment analysis tool. In C#.

"VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media."

Previously VADER was only available in python (https://github.com/cjhutto/vaderSentiment). I wanted to use it in C# so ported it over.

Getting Started

VaderSharp supports:

  • .NET Core
  • .NET Framework 3.5 and above
  • Mono & Xamarin
  • UWP

To install VaderSharp, run the following command in the Package Manager Console:

Install-Package CodingUpAStorm.VaderSharp

Usage

Import the package at the top of the page:

using VaderSharp;

Then just initialize an instance of SentimentIntensityAnalyzer and call it's PolarityScores method:

SentimentIntensityAnalyzer analyzer = new SentimentIntensityAnalyzer();

var results = analyzer.PolarityScores("Wow, this package is amazingly easy to use");

Console.WriteLine("Positive score: " + results.Positive);
Console.WriteLine("Negative score: " + results.Negative);
Console.WriteLine("Neutral score: " + results.Neutral);
Console.WriteLine("Compound score: " + results.Compound);

vadersharp's People

Contributors

beached avatar codingupastorm avatar nimaara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vadersharp's Issues

SentimentUtils: Separate data and logic

I would recommend to write all constants, words and other Information in ressource files, e.g. JSON or XML. That would support a more strict separation of data and logic. Furthermore, it simplifies i18n.

Multi Target Framework Support

This is a very nice library.

Please consider adding support for other frameworks or at the minimum a version of the full framework e.g. net40 or net452. At the moment I cannot use your NuGet anywhere other than where netstandard1.6 is supported.

FYI, you can take a look at some of my repositories (THIS or THIS) on how to enable multi target framework support in NuGet.

Alternatively let me know and I will be happy to send over a pull request.

FormatException: Input string was not in a correct format.

For your information your component is crashing right at initialization:

SentimentIntensityAnalyzer analyzer = new SentimentIntensityAnalyzer();

System.TypeInitializationException: 'The type initializer for 'VaderSharp.SentimentIntensityAnalyzer' threw an exception

FormatException: Input string was not in a correct format.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.