Metadata-Version: 2.4
Name: parsely-dip
Version: 0.0.0
Summary: PARSELY-DIP: Deterministic Intent Parser — RegEx and NLP pipeline for intent recognition
Author-email: George Butiri <george@iseestudios.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/gbutiri/parsely-dip
Keywords: nlp,intent,parser,deterministic,regex
Classifier: Development Status :: 1 - Planning
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# PARSELY-DIP

**Parsing And RegEx Syntactic Engine with Linguistic Yield — Deterministic Intent Parser**

*Parsely dip for silicon chips.*

## What It Does

PARSELY-DIP is a deterministic intent recognition engine. It processes natural language input through a cascading pipeline that resolves commands without an LLM whenever possible.

**Pipeline:** RegEx > Constituency + Dependency Parsing (Stanza) > LLM Fallback

Each layer only fires if the one above didn't match. The cheapest, fastest layer runs first. The LLM is the last resort, not the default.

## Why It Exists

LLMs are expensive, slow, and unpredictable. When a user says "what time is it" or "move the card to done," there is zero ambiguity. A regex can handle it in microseconds. An LLM spends tokens guessing what you already know.

PARSELY-DIP intercepts deterministic commands before they reach the LLM, executes them directly, and returns the result. The LLM only gets involved when the input is genuinely ambiguous.

## Architecture

### Three-Tier Pipeline

1. **RegEx Layer** — Pattern matching for known command structures. Fastest, cheapest, zero dependencies. Handles explicit commands and simple queries.

2. **NLP Layer** — Stanza constituency and dependency parsing. Matches grammatical structure, not exact strings. Handles natural phrasing variations ("what's the time" vs "what time is it" vs "tell me the time").

3. **LLM Fallback** — Only fires when neither deterministic layer can resolve the input. The input arrives with parsed metadata attached, so the LLM has structural context to work with.

### Intent Libraries

Intent handlers are sideloadable — drop a folder into `intents/` to add new capabilities:

- Each library contains regex patterns, NLP patterns, and handler functions
- Libraries are self-registering via decorators
- Base examples: time telling, weather, scrum card operations

### Integration

Designed to run as a Claude Code `UserPromptSubmit` hook. The hook intercepts the user's message, runs it through the pipeline, and either:
- **Handles it** — executes the command, returns the result
- **Passes through** — no match, the LLM processes it normally

## Pattern Convention

RegEx patterns use leading `\s+` before words, not trailing:

```
CORRECT: (what('s|\s+is)\s+the\s+time|what\s+time\s+is\s+it)
WRONG:   (what('s|is\s+)the\s+time\s+|what\s+time\s+is\s+it\s+)
```

The space belongs to the approach of the next word, not trailing from the previous.

## Status

v0.0.0 — Package name placeholder. Development starting.

## License

Source-available. Personal and development use permitted.

## Author

George Butiri — [george@iseestudios.com](mailto:george@iseestudios.com)
