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.1.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.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for intent_detection-0.1.1.tar.gz
Algorithm Hash digest
SHA256 80952a532eb0c95839ae3d9a9fa7809c8818c75276d9ecfb1ae55092fa00ff45
MD5 d1d1bf300992e99fb34ef8c693937d2c
BLAKE2b-256 ef0b266b1849a02847c811c074c2ce9ad5033e93704fa957a10e1f866a6ebc8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intent_detection-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52ad0244bc7ca11594d6dbec480007e263f47a22da85871ab803f144cd609325
MD5 6fd6e703fbd79771636d422d6795c01d
BLAKE2b-256 cdb64e1a0b18e68380e499ea1af0652be42a9b0836d1d8199869cfe2acb48f7d

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