nikolliervin.profanity-detector 1.0.6

dotnet add package nikolliervin.profanity-detector --version 1.0.6
NuGet\Install-Package nikolliervin.profanity-detector -Version 1.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nikolliervin.profanity-detector" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nikolliervin.profanity-detector --version 1.0.6
#r "nuget: nikolliervin.profanity-detector, 1.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install nikolliervin.profanity-detector as a Cake Addin
#addin nuget:?package=nikolliervin.profanity-detector&version=1.0.6

// Install nikolliervin.profanity-detector as a Cake Tool
#tool nuget:?package=nikolliervin.profanity-detector&version=1.0.6

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.5
dotnet add package nikolliervin.profanity-detector --version 1.0.5

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 285 12/2/2023
1.0.5 108 12/2/2023
1.0.1 134 11/30/2023
1.0.0 117 11/30/2023

Fixed the path to the ml model