Local, CPU-friendly pre-filter for text: linguistic sanity (pseudo-perplexity), nonsense score, toxicity, and language — no hard-coded intents.
Project description
intent-detection
Local, CPU-friendly pre-filter for user text:
- pseudo-perplexity (DistilRoBERTa) → fluency / “is it human-like?”
- nonsense score → composite of pPPL + word statistics
- toxicity → compact English toxicity classifier
- language detection →
langid
Install
pip install intent-prefilter
Quick start
from intent_prefilter import run_prefilter
v = run_prefilter("Use of dornes in nowray")
print(v.action, v.nonsense_score, v.pppl, v.toxicity)
Notes
- Runs fully local, no hand-crafted intent labels.
- Adjust thresholds in config.py if needed.
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 intent_detection-0.1.1.tar.gz.
File metadata
- Download URL: intent_detection-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80952a532eb0c95839ae3d9a9fa7809c8818c75276d9ecfb1ae55092fa00ff45
|
|
| MD5 |
d1d1bf300992e99fb34ef8c693937d2c
|
|
| BLAKE2b-256 |
ef0b266b1849a02847c811c074c2ce9ad5033e93704fa957a10e1f866a6ebc8b
|
File details
Details for the file intent_detection-0.1.1-py3-none-any.whl.
File metadata
- Download URL: intent_detection-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ad0244bc7ca11594d6dbec480007e263f47a22da85871ab803f144cd609325
|
|
| MD5 |
6fd6e703fbd79771636d422d6795c01d
|
|
| BLAKE2b-256 |
cdb64e1a0b18e68380e499ea1af0652be42a9b0836d1d8199869cfe2acb48f7d
|