8000 Enhancement Proposal: Profane Words Categorization and Intensity Grading · Issue #15 · zacanger/profane-words · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Enhancement Proposal: Profane Words Categorization and Intensity Grading #15
Open
@bradyn12

Description

@bradyn12

Overview

The current profane-words repository provides a valuable list of profane terms, but it lacks the nuance to differentiate between levels of intensity and specific categories. This enhancement proposes adding two key features to enrich the dataset and allow for more flexible filtering:

  1. Categorization – Grouping words into relevant categories (e.g., bodily, sexual, religious, insult).
  2. Intensity Grading – Assigning an intensity level to each word, ranging from 1 (mild) to 5 (extremely offensive).

Proposed Data Structure

[
    {
        "word": "crap",
        "categories": ["bodily"],
        "intensity": 1
    },
    {
        "word": "cocksucker",
        "categories": ["sexual", "insult"],
        "intensity": 5
    },
    {
        "word": "damn",
        "categories": ["religious"],
        "intensity": 2
    },
    {
        "word": "asshole",
        "categories": ["bodily", "insult"],
        "intensity": 4
    }
]

Usage Example

Developers could then filter words based on intensity or categories for customized moderation or content filtering:

// Filter words with intensity greater than 2
const intenseWords = profane_words.filter(pw => pw.intensity > 2);

// Filter words from the 'sexual' category
const sexualWords = profane_words.filter(pw => pw.categories.includes('sexual'));

Benefits

  • Customizable Filtering: Allows for more nuanced moderation levels (e.g., filtering out only the most offensive terms).
  • Context-Aware Applications: Enables applications to better handle offensive content based on category relevance.
  • Enhanced Clarity: Improves the readability and structure of the dataset for developers.

Implementation Considerations

  • Consensus on Intensity Ratings: Establish clear criteria for assigning intensity levels.
  • Backward Compatibility: Maintain the existing list format but enhance it with optional fields.
  • Documentation: Update README with examples and usage instructions.

Conclusion

This enhancement will significantly improve the flexibility and usefulness of the profane-words repository. It provides more control for developers while promoting a standardized way to evaluate the severity of offensive language.

I welcome feedback on this proposal and am happy to assist with the initial implementation if approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0