Metadata-Version: 2.4
Name: intent-detection
Version: 0.1.1
Summary: Local, CPU-friendly pre-filter for text: linguistic sanity (pseudo-perplexity), nonsense score, toxicity, and language — no hard-coded intents.
Project-URL: Homepage, https://github.com/pranavnbapat/intent_detection.git
Project-URL: Issues, https://github.com/pranavnbapat/intent_detection.git/issues
Author-email: Pranav Bapat <p.bapat@maastrichtuniversity.nl>
License: MIT
License-File: LICENSE
Keywords: chatbot,filtering,nlp,perplexity,safety,toxicity
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: langid>=1.1.6
Requires-Dist: regex>=2023.0.0
Requires-Dist: torch>=2.2.0; platform_machine != 'armv7l'
Requires-Dist: transformers>=4.40.0
Requires-Dist: wordfreq>=3.0.0
Description-Content-Type: text/markdown

# 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.

