Optional Packages¶
pip install clausal ships only the core: the DSL, import hooks, unifier,
indexer, the standard .seam library, and Python-stdlib-only modules.
Wrappers for external Python libraries and bridges to external Prolog
engines live in their own distributions and are installed separately.
Each package owns its own documentation, doctests, and examples. Use the
docs link on each row below to read its reference page. Source for every
package lives at packages/clausal-<name>/ in the main repository.
Library wrappers¶
| Package | Install | Description | Docs |
|---|---|---|---|
| clausal-jax | pip install clausal-jax |
JAX predicates: array, PRNG, transforms, sharding, jax.scipy, optax, equinox, flax |
docs |
| clausal-opencv | pip install clausal-opencv |
OpenCV (cv2) predicates: image I/O, color, imgproc, contours, drawing, features, calib3d, objdetect, video |
docs |
| clausal-provenance | pip install clausal-provenance |
Disabled pending redesign (2026-09-25). Provenance-tagged bottom-up Datalog; PyTorch / JAX-differentiable semirings for neurosymbolic AI | docs |
| clausal-scipy | pip install clausal-scipy |
SciPy wrappers: linalg, optimize, stats, integrate, interpolate, fft, ndimage, spatial, signal, sparse, cluster, special, constants, differentiate |
docs |
| clausal-sklearn | pip install clausal-sklearn |
scikit-learn predicates (estimators, preprocessing, metrics) | docs |
| clausal-spacy | pip install clausal-spacy |
spaCy NLP predicates (tokens, POS, lemmas, entities) | docs |
| clausal-sympy | pip install clausal-sympy |
SymPy symbolic-math wrapper | docs |
| clausal-torch | pip install clausal-torch |
PyTorch wrapper: tensors, torch.nn, torch.nn.functional, torch.utils.data, torch.distributions |
docs |
| clausal-yaml | pip install clausal-yaml |
YAML read/write via PyYAML | docs |
Prolog backend bridges¶
| Package | Install | Description | Docs |
|---|---|---|---|
| clausal-gprolog | pip install clausal-gprolog |
GNU Prolog backend (C extension; requires the gprolog binary) |
docs |
| clausal-scryer | pip install clausal-scryer |
Scryer Prolog backend (Rust/PyO3 extension) | docs |
| clausal-trealla | pip install clausal-trealla |
Trealla Prolog backend (pure Python via ctypes) | docs |
Status¶
These packages live in the main repository under packages/. The library
wrappers (jax, opencv, scipy, sklearn, spacy, sympy, torch, yaml) are
published to PyPI one at a time as each is released; until a package is
there, install it from the repository:
pip install "clausal-yaml @ git+https://github.com/neurosymbolica/clausal-prolog#subdirectory=packages/clausal-yaml"
The Prolog backends and clausal-provenance are not published yet. The docs links currently
point at the package sources on GitHub; they'll switch to per-package documentation sites
when each package gains its own published site (see
implementation_plans/package_extraction/docs_migration.md
for the migration plan).