Skip to content

Comment Toxicity/Profanity Analyzer, will help help increase empathy, participation and quality in online conversation at scale using Google's perspective api

License

Notifications You must be signed in to change notification settings

sandeshbsuvarna/Comment-Toxicity-Profanity-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comment Toxicity/Profanity Analyzer | Nodejs, Google Perspective API

npm version node version

Comment Toxicity/Profanity Analyzer, will help help increase empathy, participation and quality in online conversation at scale. #ConversationAI #GooglePerspectiveAPI

Quick Start

  1. Get whitelisted to use perspective api To use the API, your you need to have your email address whitelisted. Apply here.

  2. Create a Google Cloud project. Go to the Google Cloud console to create a new project. You can also use an existing project, if you have one.

  3. Enable the API. Once you've been whitelisted, you'll be able to enable the API in for your project. Go to the Perspective API's overview page and click Enable.

  4. Generate an API key. To authenticate your requests, you'll need to generate credentials for your project. Using an API key is the simplest option. Go to the API credentials page, click Create credentials, and choose "API Key".

  5. Make an AnalyzeComment request using above node.js codebase

    5a. update your .env with API Key

    5b. run npm install

    5c. run node perspective.js

    Note: 0.1 is a lower score, where as 1.0 higher score.

There are quite a few experimental models, such as "obscene", "attack on a commenter", "spam", etc, that you may find interesting.

License

The source code is licensed under MIT.

About

Comment Toxicity/Profanity Analyzer, will help help increase empathy, participation and quality in online conversation at scale using Google's perspective api

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published