All Projects → retextjs → retext-profanities

retextjs / retext-profanities

Licence: MIT License
plugin to check for profane and vulgar wording

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to retext-profanities

retext-spell
plugin to check spelling
Stars: ✭ 53 (+55.88%)
Mutual labels:  natural-language, retext, retext-plugin
remark-retext
plugin to transform from remark (Markdown) to retext (natural language)
Stars: ✭ 18 (-47.06%)
Mutual labels:  natural-language, retext
Retext
natural language processor powered by plugins part of the @unifiedjs collective
Stars: ✭ 2,119 (+6132.35%)
Mutual labels:  natural-language, retext
retext-assuming
Check for unhelpful ‘assuming’ phrases such as ‘just’, ‘simply’ or ‘obviously’ with retext
Stars: ✭ 15 (-55.88%)
Mutual labels:  retext, retext-plugin
gdpr-fingerprint-pii
Use Watson Natural Language Understanding and Watson Knowledge Studio to fingerprint personal data from unstructured documents
Stars: ✭ 49 (+44.12%)
Mutual labels:  natural-language
buzzwords
List of (possible) English buzzword words
Stars: ✭ 51 (+50%)
Mutual labels:  natural-language
TextFeatureSelection
Python library for feature selection for text features. It has filter method, genetic algorithm and TextFeatureSelectionEnsemble for improving text classification models. Helps improve your machine learning models
Stars: ✭ 42 (+23.53%)
Mutual labels:  natural-language
automation-for-humans
Converts English statements to automation.
Stars: ✭ 67 (+97.06%)
Mutual labels:  natural-language
pixiedust-facebook-analysis
A Jupyter notebook that uses the Watson Visual Recognition and Natural Language Understanding services to enrich Facebook Analytics and uses Cognos Dashboard Embedded to explore and visualize the results in Watson Studio
Stars: ✭ 42 (+23.53%)
Mutual labels:  natural-language
react-taggy
A simple zero-dependency React component for tagging user-defined entities within a block of text.
Stars: ✭ 29 (-14.71%)
Mutual labels:  natural-language
openvalidation
Compose validation rules in the language you use every day, openVALIDATION handles code creation for you.
Stars: ✭ 62 (+82.35%)
Mutual labels:  natural-language
aprenda-python
Aprendizado, dicas e projetos sobre Python
Stars: ✭ 22 (-35.29%)
Mutual labels:  natural-language
fillers
List of (possible) English filler words
Stars: ✭ 36 (+5.88%)
Mutual labels:  natural-language
hedges
List of (possible) English hedge words
Stars: ✭ 39 (+14.71%)
Mutual labels:  natural-language
apertium-html-tools
Web application providing a fully localised interface for text/website/document translation, analysis and generation powered by Apertium.
Stars: ✭ 36 (+5.88%)
Mutual labels:  natural-language
IsSeptaFcked
Real-time status for Philadelphia Regional Rail
Stars: ✭ 47 (+38.24%)
Mutual labels:  profanity
rita
Website, documentation and examples for RiTa
Stars: ✭ 42 (+23.53%)
Mutual labels:  natural-language
google-profanity-words
Full list of bad words and top swear words banned by Google.
Stars: ✭ 357 (+950%)
Mutual labels:  profanity
nl4dv
A python toolkit to create Visualizations (Vis) using natural language (NL) or add an NL interface to existing Vis.
Stars: ✭ 63 (+85.29%)
Mutual labels:  natural-language
lancaster-stemmer
Lancaster stemming algorithm
Stars: ✭ 22 (-35.29%)
Mutual labels:  natural-language

retext-profanities

Build Coverage Downloads Size Sponsors Backers Chat

retext plugin to check for profane and vulgar wording. Uses cuss for sureness.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install retext-profanities

Use

Say we have the following file, example.txt:

He’s pretty set on beating your butt for sheriff.

…and our script, example.js, looks like this:

import {readSync} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {unified} from 'unified'
import retextEnglish from 'retext-english'
import retextProfanities from 'retext-profanities'
import retextStringify from 'retext-stringify'

const file = readSync('example.txt')

unified()
  .use(retextEnglish)
  .use(retextProfanities)
  .use(retextStringify)
  .process(file)
  .then((file) => {
    console.error(reporter(file))
  })

Now, running node example yields:

example.txt
  1:33-1:37  warning  Be careful with “butt”, it’s profane in some cases  butt  retext-profanities

⚠ 1 warning

API

This package exports no identifiers. The default export is retextProfanities.

unified().use(retextProfanities[, options])

check for profane and vulgar wording. Uses cuss for sureness.

options.ignore

Phrases not to warn about (Array.<string>, default: []).

options.sureness

Minimum sureness to warn about, see cuss (number, default: 0).

Rules

See rules.md for a list of rules.

Note that Latin-script Arabic (retext-profanities/ar-latn), French (retext-profanities/fr), Spanish (retext-profanities/es), Italian (retext-profanities/it), and Portuguese (Brazilian) (retext-profanities/pt) are also supported.

Messages

See rules.md for a list of rules and how rules work.

Each message is emitted as a VFileMessage on file, with the following fields:

message.source

Name of this plugin ('retext-profanities').

message.ruleId

See id in rules.md.

message.profanitySeverity

Cuss sureness (number).

message.actual

Profane phrase (string).

message.expected

Empty array to signal that actual should be removed or changed ([]).

Related

Contribute

See contributing.md in retextjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].