A dead-simple library to help analyze the sentiment of a particular term on Reddit.
- Signup for a Azure Cognitive Services account. You can get 5,000 free transactions/month for free. Note down your API key and region for your account.
- Create a new instance of
SentimentAnalyzer
:
var analyzer = new SentimentAnalyzer(logger,
"your-cognitive-services-key", // replace with your key
AzureRegions.WestUs); // replace with assigned region
- Call
GetSentimentAsync
, passing through a subreddit and search term. For example:
var results = await analyzer.GetSentimentAsync("cryptocurrency", "bitcoin");