How kea-mindz/cyberbully works
Cyberbully is a Python package and CLI for transformer-based cyberbullying detection. Users submit text through the Python API, CLI, interactive console, or batch-file interface; the detector locates model assets, cleans and tokenizes input, runs binary and intent-category inference, and returns predictions and diagnostics. The README also documents nuance-aware classification and adversarial-text handling, reflected in the multi-task model and preprocessing components. The excerpts show these runtime calls and model-loading behavior; broader claims about distribution or training are not mapped as runtime components.
Main entry points: detector.py Detection engine · cli.py CLI and batch input · downloader.py Model downloader · __init__.py Python API
Components 11
User interfaces
- Python API
src/cyberbully/__init__.py - CLI and batch input
src/cyberbully/cli.py
Inference pipeline
- Detection engine
src/cyberbully/detector.py - Text preprocessing
src/cyberbully/preprocessing.py - Hugging Face tokenizer
- Multi-task classifier
src/cyberbully/model.py
Model assets and cache
- Checkpoint and configs
models/cyberbully_v0.1_run - Model downloader
src/cyberbully/downloader.py - Local model cache
Other components
- Developer or moderator
- Google Drive
Connections 17
- Developer or moderator → Python API: submits text
README.md - Developer or moderator → CLI and batch input: submits text or file
README.md - Python API → Detection engine: delegates prediction
src/cyberbully/__init__.py - CLI and batch input → Detection engine: runs inference
src/cyberbully/cli.py - CLI and batch input → Model downloader: requests download
src/cyberbully/cli.py - Detection engine → Model downloader: resolves missing model
src/cyberbully/detector.py - Detection engine → Text preprocessing: cleans text
src/cyberbully/detector.py - Detection engine → Hugging Face tokenizer: tokenizes batches
src/cyberbully/detector.py - Detection engine → Multi-task classifier: runs inference
src/cyberbully/detector.py - Detection engine → Checkpoint and configs: loads weights and config
src/cyberbully/detector.py - Detection engine → Checkpoint and configs: loads tokenizer assets
src/cyberbully/detector.py - Model downloader → Local model cache: writes downloaded assets
src/cyberbully/downloader.py - Model downloader → Google Drive: downloads model files
src/cyberbully/downloader.py - Multi-task classifier → Detection engine: returns logits
src/cyberbully/detector.py - Detection engine → Python API: returns predictions
src/cyberbully/__init__.py - Detection engine → CLI and batch input: returns predictions
src/cyberbully/cli.py - Checkpoint and configs → Hugging Face tokenizer: provides tokenizer files