Structural bias detection engine built on Persistent Influence Theory (PIT). Detect framing, anchoring, false consensus, and 30+ rhetorical distortion patterns.
Project description
BiasClear
Structural bias detection and correction engine built on Persistent Influence Theory (PIT).
BiasClear identifies and corrects structural bias in text — not surface-level sentiment, but the deeper patterns that shape how information is framed, weighted, and presented. It uses a frozen ethics core (immutable code, not tunable weights) to evaluate text against epistemological principles.
Features
- Scan — Detect structural bias patterns (framing, anchoring, authority, omission, false equivalence)
- Correct — Generate debiased alternatives with inline diffs
- Score — Calculate truth alignment scores based on PIT principles
- Audit — SHA-256 blockchain audit chain for every evaluation
- Frozen Ethics Core — Immutable governance engine that cannot be prompt-injected
Quick Start
# Install
pip install -e .
# CLI usage
biasclear scan "The data clearly proves that this approach is the only viable option."
biasclear correct "Studies overwhelmingly show..."
# API server
pip install -e ".[api]"
uvicorn biasclear.api:app --port 8100
Architecture
biasclear/
├── frozen_core.py # Immutable ethics engine (PIT-based)
├── detector.py # Bias pattern detection
├── corrector.py # Bias correction with diffs
├── scorer.py # Truth alignment scoring
├── audit.py # SHA-256 audit chain
├── api.py # FastAPI server
├── cli.py # Command-line interface
└── demo.html # Interactive demo page
Client SDK
A Python client SDK for consuming the BiasClear API is included in biasclear-client/:
pip install -e ./biasclear-client
from biasclear_client import BiasClearClient
client = BiasClearClient(base_url="http://localhost:8100", api_key="your-key")
result = client.scan("The data clearly shows...")
print(result.flags)
See biasclear-client/README.md for full SDK documentation.
License
AGPL-3.0 — See LICENSE for details.
The client SDK (biasclear-client/) is licensed under MIT for unrestricted integration.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biasclear-1.1.0.tar.gz.
File metadata
- Download URL: biasclear-1.1.0.tar.gz
- Upload date:
- Size: 82.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4a1746450abcfeff21fc1767682d3217a39cae373f6197ca61333f1db48bbca
|
|
| MD5 |
8c7d49119c0471798fcdc495624f32c5
|
|
| BLAKE2b-256 |
e6286120553e8528deee3377dfbfdccec8c48f475a43b5fc870b9364b0098a62
|
File details
Details for the file biasclear-1.1.0-py3-none-any.whl.
File metadata
- Download URL: biasclear-1.1.0-py3-none-any.whl
- Upload date:
- Size: 92.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
005d29332279ebffaf29a0cbd6b67b7cdded5ee38fd6dd8388f72841b01f1fa9
|
|
| MD5 |
796466c611780cc514105cbf80279d64
|
|
| BLAKE2b-256 |
81d5de0a7a6167d87fc2814979582a4b8478c8bf71360a77b3dc427d5c9a62c8
|