API reference
Public surface imported from vaakly.
Convenience functions
| Function | Description |
|---|---|
polish(text, *, profile="plain") |
Polish a paragraph |
compose(fragments, *, profile="api") |
Compose fragments into one message |
logify(text) |
Normalize log text (profile="log") |
redact(text, **flags) |
Redact secrets / PII |
tokenize / detokenize |
Typed tokenization |
assemble_sentence |
Vocab-correct + assemble |
vocabulary_size / is_known |
Bundled lexicon helpers |
Vaakly client
Vaakly(
*,
profile="plain", # api | log | plain
backend="rule", # rule | http | onnx
max_chars=50_000,
max_fragments=200,
spellcheck=True,
preserve_tokens=True, # misspellings only; no edit-distance
http=None,
onnx=None,
)
Methods: polish, compose, logify,
run → Result, close, context manager.
Result
@dataclass(frozen=True)
class Result:
text: str
profile: Profile
backend: BackendName
fragments: tuple[str, ...]
warnings: tuple[str, ...]
meta: dict # token_count, vocabulary_size, engine, …
Exceptions
VaaklyError— baseConfigError— invalid optionsBackendError— backend failure when fail-closedInputTooLargeError— exceedsmax_chars
Full markdown source: documentation/api-reference.md