Getting started

Python 3.10+. No mandatory third-party packages for the default rule engine.

Install

pip install vaakly

pip install vaakly[http]     # OpenAI-compatible HTTP backend
pip install vaakly[onnx]     # ONNX Runtime local models
pip install vaakly[server]   # FastAPI example dependencies

First polish

from vaakly import polish

print(polish("user not found.  try again.."))
# User not found. Please try again.

Compose fragments

from vaakly import compose

print(compose(
    ["validation failed", "email is required", "password too short"],
    profile="api",
))

Log lines

from vaakly import logify

print(logify("ERR timeout db=users retries=3"))
# Timeout (error) for database users after 3 retries.

Reusable client

Prefer one Vaakly instance per process or worker (loads vocab once):

from vaakly import Vaakly

with Vaakly(profile="api", preserve_tokens=True) as client:
    msg = client.polish("order cancelled. refund pending.")
    result = client.run("email is required, password too short")
    print(result.text)
    print(result.meta)

What Vaakly will and will not do

Will Will not
Fix common misspellings and ESL phrases Invent new facts or requirements
Add grammatical glue (a, the, is) Download models at runtime
Keep phones, URLs, key=value, plurals Replace an LLM for open-ended writing
Work offline behind corporate firewalls Translate to non-English

Next: Recipes · API reference · Examples