Installation¶
The base install is deliberately tiny — pyyaml + httpx. Optional detection
layers are pulled in as extras.
Extras¶
| Extra | Adds | Layer |
|---|---|---|
| (base) | regex detection + Ollama / OpenAI-compatible LLM backend | regex, llm (HTTP) |
ner |
SpaCy | ner |
transformers |
HuggingFace Transformers + torch | llm (in-process) |
all |
everything above | all |
SpaCy models (for the NER layer)¶
The NER layer needs a language model. The simplest path is to let wardcat
resolve and download it via the language= builder:
from wardcat import Wardcat, Language
guard = Wardcat().with_ner(language=Language.EN) # → en_core_web_sm
guard = Wardcat().with_ner(language=Language.TR, spacy_size="md") # → tr_core_news_md
Or download a model yourself:
Requirements¶
- Python 3.11+