Skip to main content

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 detectionlangid

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

intent_detection-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

intent_detection-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file intent_detection-0.1.0.tar.gz.

File metadata

  • Download URL: intent_detection-0.1.0.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

Hashes for intent_detection-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a027962e1bcec233ddc2e307933c323b933277e8cb9cc3e444a81fcf7076e6b4
MD5 a1fb4eef7b24499025694a353a327867
BLAKE2b-256 7bf9445d7876b10c4007ff9513fe9fa093f29942c66c4d88f509a80ea6c5f05a

See more details on using hashes here.

File details

Details for the file intent_detection-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for intent_detection-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9033adb660d2a7c9d4e91f5d9f42515ce5c829677a4080fe9ad9b403651754d9
MD5 ac84b5845b4c874cfa0e1cd92fbc1e5e
BLAKE2b-256 9a7f8cda621f286e3c19ce2059b2b58eb032d030a3fe9506c18dcfe547d72801

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