Skip to content

LSUDOKO/remove_cuss_word

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages