Skip to main content

nlp2cmd-intent

NL → IntentIR: normalizacja, detekcja intencji, encje.

Kanoniczna implementacja KeywordIntentDetector — nlp2cmd re-eksportuje ją z nlp2cmd.generation.keywords.

Użycie

from nlp2cmd_intent import IntentPipeline, analyze_query, ensure_intent_clear

intent = IntentPipeline().run("znajdź pliki *.py w src")
print(intent.intent, intent.target_kind, intent.confidence)

if intent.needs_clarification():
    # confidence < 0.5 lub niepuste ambiguities
    ...

ensure_intent_clear(intent, enforced=True)  # raises IntentClarificationRequired

structure = analyze_query("znajdź pliki *.py w src", include_plan=True)

Egzekwowanie clarification

flowchart LR
    IR[IntentIR] --> NC{needs_clarification?}
    NC -->|plan — zawsze| BLOCK[IntentClarificationRequired]
    NC -->|show — opcjonalnie| ENV{NLP2CMD_ENFORCE_CLARIFICATION=1}
    ENV -->|tak| BLOCK
    ENV -->|nie| OK[kontynuuj]
Ścieżka Zachowanie
nlp2cmd plan zawsze blokuje przy niskiej pewności
nlp2dsl show tylko z NLP2CMD_ENFORCE_CLARIFICATION=1

Kontrakty Intract (plan steps) — w nlp2cmd, nie w tym pakiecie. Zob. docs/intract-integration.md.

CLI (przez nlp2dsl-show)

nlp2dsl show "znajdź pliki *.py w src"

Instalacja

pip install -e packages/pact-ir
pip install -e packages/nlp2cmd-intent

Pliki danych

Bundlowane w src/nlp2cmd_intent/data/:

  • patterns.json
  • keyword_intent_detector_config.json

Override: NLP2CMD_PATTERNS_FILE, NLP2CMD_DETECTOR_CONFIG_FILE, NLP2CMD_CONFIG_DIR.

Download files

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

Source Distribution

nlp2cmd_intent-0.1.2.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

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

nlp2cmd_intent-0.1.2-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlp2cmd_intent-0.1.2.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for nlp2cmd_intent-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6a4c0f1adb166bda6b9559a43f59a4afadbc95d613c58f645c51cd786e2caaed
MD5 9f354e1ec3f8e1549fb4b7ede0a7600e
BLAKE2b-256 c2272fbad4c4f77d7e06ba848aee7478411210be209e5a0c2d49e07eb12b18ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlp2cmd_intent-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for nlp2cmd_intent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c19d2b306e3052934cde6c134fb1bee304be4a4261791229a8292de671c5b59
MD5 45288cc7dcb34221ea0d84a665ff433c
BLAKE2b-256 5ad9b7a5172003df23d6cd9e52485b664cc9740b6233239c085f185ab5b4ad6e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page