Skip to content

jensg/vadersharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

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 is built on .NET Standard v1.6. As such it should work across any variant of the .NET framework, as long as you're running the most up-to-date version.

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);

About

Sentiment analysis using VADER with C#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%