Skip to main content

Lightweight Python library for detecting, searching, and analyzing forbidden words and phrases in text data.

Project description

SCheck Blocklist

Python package enabling seamless integration with the SCheck Blocklist datasets

Actually Version: 1.1.0

Our Websites: scheck-blocklist.vercel.app


Content


Installation

To download a library from PyPI via pip just use the command:

pip install scheckbl

Quick Start

Below is sample code showing the syntax:

from scheckbl import blocklist

c = blocklist.check("phrases", "vulgarisms", "f*ck")        # output: True
f = blocklist.find("phrases", "vulgarisms", "I f*ck you")    # output: True
g = blocklist.get("urls", "ads")                              # output: list
s = blocklist.similar("phrases", "vulgarisms", "f*uck", 0.3) # output: json

API Reference

blocklist.check

Checks whether a given keyword is present in the specified blocklist.

  • type_name: category group, e.g., "phrases" or "urls"
  • category: sublist name, e.g., "vulgarisms", "ads"
  • keyword: the word or phrase to check
  • Returns: True if keyword is found on the blocklist; otherwise, False

📌 Note: If keyword is a URL, the last segment (after the last /) is automatically extracted before checking.


blocklist.find

Checks whether any part of the keyword string contains entries from the blocklist.

  • type_name: same as above
  • category: same as above
  • keyword: full sentence or input string to search through
  • Returns: True if any blocklisted entry is found; otherwise, False

📌 Note: Just like check(), URLs will be trimmed to their final segment.


blocklist.get

Retrieves the full blocklist for the given category.

  • type_name: e.g. "phrases"
  • category: e.g. "ads"
  • filename (optional): specific file to load
  • regex (optional): regex pattern to filter results
  • Returns: a list of strings representing the full blocklist, each entry as a separate line

blocklist.similar

Finds entries in the blocklist that are similar to the input phrase.

  • type_name: e.g., "phrases"
  • category: e.g., "vulgarisms"
  • phrase: the string to compare
  • threshold: similarity threshold from 0.0 to 1.0 (default: 0.6)
  • Returns: list of tuples (entry: str, similarity: float) representing blocklist entries with similarity scores

Created with ❤️ by SCheck-Team

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

scheckbl-1.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scheckbl-1.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file scheckbl-1.1.0.tar.gz.

File metadata

  • Download URL: scheckbl-1.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for scheckbl-1.1.0.tar.gz
Algorithm Hash digest
SHA256 097bd638a961022841cacf29ff375a58deb110983c006558d50c7e5e9640584f
MD5 2585bc4a4b56d7958a41838d9754dbf3
BLAKE2b-256 3e58b7353abbeff85a2f9de2924ed59c94a60d1c81a65c22adf547a1a0e97e46

See more details on using hashes here.

File details

Details for the file scheckbl-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: scheckbl-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for scheckbl-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b32c0d74a7855e3639ad2094df02316df474c5ecc42d307d7c5309704a7a60d1
MD5 e72f22c1b82253ef6b17c878a8563b9f
BLAKE2b-256 7496cba43172c437819abe8c3f342e93ed0875355de5a9ffd10f497790f6da0b

See more details on using hashes here.

Supported by

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