nikolliervin.profanity-detector
1.0.5
See the version list below for details.
dotnet add package nikolliervin.profanity-detector --version 1.0.5
NuGet\Install-Package nikolliervin.profanity-detector -Version 1.0.5
<PackageReference Include="nikolliervin.profanity-detector" Version="1.0.5" />
paket add nikolliervin.profanity-detector --version 1.0.5
#r "nuget: nikolliervin.profanity-detector, 1.0.5"
// Install nikolliervin.profanity-detector as a Cake Addin #addin nuget:?package=nikolliervin.profanity-detector&version=1.0.5 // Install nikolliervin.profanity-detector as a Cake Tool #tool nuget:?package=nikolliervin.profanity-detector&version=1.0.5
Profanity Detector NuGet Package
Overview
This package is designed to help you easily identify and detect profanity or bad words within a given sentence or string. It leverages a simple binary classifier that has been built and trained for accurate and efficient detection of inappropriate language. The model was created using ML.Net and the dataset for training was obtained from Surge AI
Installation
To get started, install the Profanity Detector NuGet package into your project. You can do this using the following command in the Package Manager Console:
NuGet\Install-Package nikolliervin.profanity-detector -Version 1.0.1
dotnet add package nikolliervin.profanity-detector --version 1.0.1
Usage
Once the package is installed, integrating it into your code is straightforward. Here's a simple example of how to use the Profanity Detector:
using profanity_detector;
class Program
{
static void Main(string[] args)
{
// Instantiate the ProfanityDetection class
var profanityDetector = new ProfanityDetection();
// Detect profanity in a string
var hasProfanity = profanityDetector.isToxic("string to detect");
// 'hasProfanity' will be true if profanity is detected, otherwise false
if (hasProfanity)
{
Console.WriteLine("Profanity detected in the provided string!");
// Handle the profanity as needed
}
else
{
Console.WriteLine("No profanity detected. The string is clean!");
}
}
}
How it Works
The Profanity Detector utilizes a simple binary classifier that has been built and trained to distinguish between clean and profane language. The underlying algorithm analyzes the input string and returns true
if it contains bad words and false
otherwise.
Note
While the Profanity Detector is effective in identifying common profanity and bad words, but it may not be exhaustive. I am actively working to increase the accuracy of the detection.
Feedback and Contributions
I welcome your feedback! If you encounter any issues, have suggestions for improvement, or want to contribute to the project, please visit my GitHub repository and create an issue or pull request.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- Microsoft.ML (>= 1.7.1)
- Microsoft.ML.FastTree (>= 1.7.1)
- Microsoft.ML.LightGbm (>= 1.7.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixed the path to the ml model