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.2.tar.gz (5.1 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.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: intent_detection-0.1.2.tar.gz
  • Upload date:
  • Size: 5.1 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.2.tar.gz
Algorithm Hash digest
SHA256 00ec876637189e4d2fda36198fdd6eb4ca4041920e71434e021a125dccc57d80
MD5 524e4ad298b379f4cbb2cbc99fcabf19
BLAKE2b-256 d11c9dd17379756778ff09a9b733c7ea6b89ec389d0218a83f4b612910beef32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intent_detection-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6255bde7f66a5512d6d68b2f8ac33049ba5f5e5dc201611dd925604d984352b7
MD5 28bbf8651bb67a5bc70b3c16517cd977
BLAKE2b-256 288f6d420d3ae58aa252011636131a99177ca2f976109edaa5342039114d74f3

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