![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Free nodejs module to detect languages and profane/immodest words in a text
Free nodejs module to detect languages and profane/immodest words in a text
npm install aedos
Aedos is a free nodejs module created primarly to detect profane and immodest words in a text, as an addition it can detect as well languages of a specific text, the module uses Artificial Intelligence in order to detect both the text and the profanity in a text with a list of profane words as a data modal in order to train it.
it can detect 62 languages and it will be added new ones soon.
You can use now the method validate text to be able to validate the text once without the need to repeat the process after that you can use any of the following methods to manipulate the text as following.
the detection is relative to the length of the text the longer was the text the more detection will be accurate, in case the text was to small (less then 2 words) it will throw an "InputError" with a message.
const { validateText } = require("aedos");
// then use it with any async/await function
async function detectLanguages(text) {
const detectionResult = await validateText(text).detectLanguagesInText();
return detectionResult;
// this will return an object like this { data: {"detected-languages": [{language: "en", accurarcy: 1}]}}
}
the detection is based on a statistical matching using some hasing algorithms, the algorithm transform every each charchter in a word into a digit and then calculates the percent of the similarity of the word in a text and the pattern, and then generate the final percent of the matching.
the module can detect the profanity in a text with one language or multiple as following:
const { validateText } = require("aedos");
let text = "f** you mo*** fu*** i will kill you j*, mal***";
// using async/await
async function detectBadWords(text) {
let result = await validateText(text).detectProfaneWordsInText();
return result;
// this will return an object like this
// { data: {"founded-}word": [f**]}
// ...
}
const { validateText } = require("aedos");
let text = "you m*** f*** i will k***, راح ا**** يا ق***ة";
// using async/await
async function detectBadWords(text) {
let result = await validateText(text).detectProfaneWordsInText();
return result;
// this will return an object like this
// { data: {"founded-}word": [f**]}
// ...
}
It's new in version 1.1.2 (release) with this method if you want to remove any profane words in a text and keep your text clean this can be done so easily, this feature can help you provide for your user credibility by comparing between the original text and the moderated text in the result as the following.
const { validateText } = require("aedos");
async function removeBadWords(text) {
const { originalText, moderatedText } = await validateText(
text
).removeProfaneWordsFromText();
// return you result as your app requires
}
if you found a bug or a problem while using the project please put a bug report in the issues section and explain what's the problem exactly, make sure to name the bug based on the level of the problem you had for example, if you faced it in using the language detection method write like this: Bug:LanguageDetectionERR and write your decription
Yes feel free to make a feature request in the issues section with the label of "FeatureRequest:" and explain what ideas do you have and why, and i will make it exist as soon as possible.
am currently making this project as a side project so if you found it interesting and want to support me i will be so glad to buy me a coffee
FAQs
Free nodejs module to detect languages and profane/immodest words in a text
The npm package aedos receives a total of 3 weekly downloads. As such, aedos popularity was classified as not popular.
We found that aedos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.