All Projects → words → Cuss

words / Cuss

Licence: mit
🤬 Map of profane words to a rating of sureness

Programming Languages

javascript
184084 projects - #8 most used programming language

cuss

Build Downloads Size

Map of profanities, slurs, and obscenities to a sureness rating. This rating does not represent how vulgar a term is, instead, how likely it is to be used as either profanity or clean text.

Install

npm:

npm install cuss

Use

var cuss = require('cuss')

console.log(Object.keys(cuss).length) // 1776

console.log(cuss.beaver) // 0
console.log(cuss.asshat) // 2

Usage of locale versions

To use Portuguese (as used in Brazil), do:

var cuss = require('cuss/pt-br')

console.log(Object.keys(cuss).length) // 173

console.log(cuss.burro) // 1
console.log(cuss.bixa) // 2

API

cuss

cuss is a dictionary of phrases to ratings (Object.<number>), where each key can be considered offensive, and each rating is a number between 0 and 2 (both including), representing the certainty the key is used as a profanity depending on context.

Rating Use as a profanity Use in clean text Example
2 likely unlikely asshat
1 maybe maybe addict
0 unlikely likely beaver

Support

Related

  • buzzwords — List of buzzwords
  • dale-chall — List of familiar American-English words (1995)
  • fillers — List of filler words
  • hedges — List of hedge words
  • profanities — List of the same profane words, but without the sureness
  • spache — List of simple American-English words (1974)
  • weasels — List of weasel words

Contributing

Thanks, contributions are greatly appreciated! 👍

New terms can be added to the corresponding JSON file as listed in the support section.

To add a new language, create a new JSON file using a lower-cased and dash-cased preferred (according to the IANA registry) BCP 47 language tag.

After adding a word, run npm install to install all required dependencies, then npm test to update: the project includes some scripts to make sure everything is in order. Finally, open a Pull Request.

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].