Skip to content

AdeepaK2/kunuharupa-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package Logo

Kunuharupa - Sinhala Profanity Filter

A Node.js package to detect and filter profanity in both Sinhala Unicode and Singlish text.

Installation

npm install kunuharupa

Usage

const { detectProfanity, filterProfanity } = require('kunuharupa');
else
import { detectProfanity, filterProfanity } from "kunuharupa"

// Detect profanity
const text = "Your text here with Sinhala/Singlish content";
const result = detectProfanity(text);
console.log(result.profanities); // Array of detected profane words
console.log(result.count); // Number of profanities found

// Filter profanity
const filteredText = filterProfanity(text);
console.log(filteredText); // Text with profanities replaced by asterisks

Features

  • Detects profanity in both Sinhala Unicode and Singlish text
  • Returns count and list of detected profane words
  • Filters profanity by replacing with asterisks
  • Easy to integrate with any Node.js application

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors