Skip to main content

Text filtering tool

Project description

Python version

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

str


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

str


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


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.0.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

bleep_it-0.2.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page