Skip to main content

clausal-spacy

spaCy predicates for Clausal Prolog.

Wraps spaCy's NLP pipeline as Clausal Prolog predicates: model management, tokenisation, linguistic annotations, named entities, sentences, noun chunks and vector similarity.

Install

pip install clausal-spacy

spacy is pulled in as a dependency. Download at least one model, for example python -m spacy download en_core_web_sm. Requires Python 3.13 or later.

Use

Import the predicates into a seam (.seam) module, as the package's own tests do. A Clausal Prolog (.clausal) module reaches Python only through the seam: put the imports in a .seam module and list it under [tool.clausal] python_bridges in your project's pyproject.toml (see Importing Prolog).

This test, from tests/fixtures/spacy_basic.seam, shows the shape of a call:

-import_from(spacy, [load_model, process, token, token_text])

setup(DOC) <- (load_model("en_core_web_sm", "test") and process("test", "Apple is looking at buying U.K. startup for $1 billion.", DOC))

test("token iteration") <- (setup(DOC) and token(DOC, TOK) and token_text(TOK, "Apple"))

Documentation

License

MIT

Metadata

Release files for clausal-spacy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clausal-spacy 0.1.0
File Size Uploaded
clausal_spacy-0.1.0.tar.gz 14.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clausal-spacy 0.1.0
File Interpreter ABI Platform
clausal_spacy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / clausal_spacy-0.1.0.tar.gz

Download URL clausal_spacy-0.1.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f43b3068b95a905b49ba1e15a54d0a4c47f6c79bd85c4f56d888a1cfaa365b59
BLAKE2b-256 checksum
How to use checksums
06dab695fd8202976c232a6209507004edeaca5ffad161342757e6794072c6f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / clausal_spacy-0.1.0-py3-none-any.whl

Download URL clausal_spacy-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fabb06ff5d1d4239853bad765061a541e2c7814327cd9cc89bb5a8494e3b2b2
BLAKE2b-256 checksum
How to use checksums
8eae9feca130d74f6a586f16ab711088feb2118f242717f0fb36b5089c429f8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page