txtures
txtures computes word- and region-level features of text for psycholinguistic research. Its first feature is surprisal from causal language models on the Hugging Face hub, with word-boundary correction and user-defined regions.
txtures is in early development. Its interfaces will change during the 0.x series.
Installation
From a checkout on Linux or macOS:
./install
This downloads a pinned uv and Python and installs txtures with its locked
dependencies into txtures-install/ in the checkout, without using or
changing any Python already on the machine. It puts a txtures command in
~/.local/bin. Useful options:
--compute cpuinstalls PyTorch without CUDA (the default on Linux is CUDA).--site DIRuses a lab's txtures home, which holds its definitions, stored results, and models.txtures site use DIRdoes the same later.--prefix DIRinstalls somewhere other than the checkout.--upgradefirst updates the checkout to the newest release.
On a Slurm cluster, txtures site set execution.executor=slurm slurm.partition=NAME makes txtures run submit its computation as a job
and return at once (slurm.account, slurm.gpus, and others are optional).
Follow the job with txtures status.
Run ./install --help for every option and txtures site ls to see the
resulting settings. For gated models, run txtures hf login once.
txtures can also be installed with pip or uv as a dependency of other software; see Settings.
Use
Put a file of sentences, one per line, in the inputs directory as
gardenpath.txt, then:
txtures run gardenpath
This writes a table with one row per word and its surprisal under GPT-2 to the outputs directory. From Python:
import txtures as tx
table = tx.compute("surprisal", ["The horse raced past the barn fell."])
See the documentation, starting with Getting started.
Development
./install --dev
txtures-install/env/bin/python -m pytest -q
See CONTRIBUTING.md for contribution, attribution, and release rules, and WRITING_POLICY.md for documentation style.
License
MIT. See LICENSE.
Metadata
Release files for txtures 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| txtures-0.3.2.tar.gz | 112.1 kB | With provenance | Details for txtures-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| txtures-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for txtures-0.3.2-py3-none-any.whl |
Total release size: 200.5 kB
Release files / txtures-0.3.2.tar.gz
| Download URL | txtures-0.3.2.tar.gz |
|---|---|
| Size | 112.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95d69f4edb5ceea06784e7ee09bf6733f9df37ce16f57b119987ae2ef396b201
|
|
BLAKE2b-256 checksum How to use checksums |
bb8a6129c0c5fca980460f0024465d70aabcb4b8a06d31669a7432cf5dca312d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 19, 2026.
Transparency logRelease files / txtures-0.3.2-py3-none-any.whl
| Download URL | txtures-0.3.2-py3-none-any.whl |
|---|---|
| Size | 88.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9475bb66b4ecb3dddef067a6d6cae1fa109df453907ff49a06436fd3a9036832
|
|
BLAKE2b-256 checksum How to use checksums |
955dfb7e11ccba42f5f9288d6692a55abc55d965378d6bc20ea95fe2b679696d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 19, 2026.
Transparency logSecurity for txtures 0.3.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for txtures-0.3.2.tar.gz
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 Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.