Text filtering tool
Project description
Bleep-it
Text filtering tool
:clipboard: Table Of Content
Installation
Quickstart
Documentation
Bleep-it Tools
License
Installation
pip install bleep-it
:: for Latest (unstable)
pip install git+https://github.com/Marseel-E/bleep-it
Quickstart
import asyncio
import bleep
async def main():
while True:
text = input("text: ")
filtered_text = await bleep.filter(text=text, strickness=2)
print("filtered_text:", filtered_text)
if __name__ == '__main__':
asyncio.run(main())
Documentation
async
filter
await filter(text, strickness=2, action=Censor())
This function is a coroutine.
Filters the text given and returns the filtered test.
Parameters
- text ( str ) - The text to be filtered.
- strickness ( int ) - The level of strickness of the filtering.
- action ( Censor | Remove ) - The action to take when filtering a word.
Returns
The filtered text.
Return type
class
Censor
Sensors the filtered word.
Methods
async
generate
await generate(word)
This function is a coroutine.
Generates the censorship to replace the word with.
Parameters
- word ( str ) - The word to be censored.
Returns
The censored replacement for the word.
Return type
class
Remove
Removes the filtered word from the text.
Bleep-it Tools
Bleep-it Tools is an extension for Bleep-it that allows you to
- Create custom words.
-
Generate other languages.soon
:scroll: License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bleep-it-0.2.2.tar.gz
(5.6 kB
view hashes)