Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.16 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.16 KB

🚫 Remove Cuss Words from Text 📝

This repository provides a Python script to remove cuss words from a given text using the better_profanity package.

Python License

📦 Installation

To use this script, you need to install the better_profanity package. You can do this using pip:

pip install better_profanity

🚀 Usage

Here's an example of how to use the script to remove cuss words from a text file:

from better_profanity import profanity

# Initialize the profanity filter
profanity.load_censor_words()

# Function to remove cuss words from text
def remove_cuss_words(text):
    return profanity.censor(text)

# Example usage
if __name__ == "__main__":
    text = "This is a damn example text with some cuss words."
    clean_text = remove_cuss_words(text)
    print(clean_text)  # Output: This is a **** example text with some **** words.

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

📄 License

This project is licensed under the MIT License.