Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

brianebeling/Rethought.Perspective

Repository files navigation

Rethought.Perspective

This library is deprecated, no longer maintained and might be outdated, use at your own risk.

.Net Standard Library for the Perspective API. The Perspective API can be used to analyze messages based on certain models, like toxicity.

Installation

Using the library

To be able to make calls to the API you need to instantiate a client to work with. That should be done like this:

var client = PerspectiveClientFactory.Create(new HttpClient(), "YourToken");

then you can start making requests by doing:

var response = await client.AnalyzeCommentAsync("This is stupid!", builder => builder.WithModel(Model.Toxicity | Model.ToxicitySevere));

This will return a response with the respective properties for Toxicity, SevereToxicity and Spam populated. The other models will be null.

For reference how the response is structured please utilize the Perspective API reference.

Documentation

Documentation will be available in a GitHub Wiki. This ReadMe is only a temporary solution.

About

.Net wrapper for the Perspective API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages