Skip to main content

Fast allotaxonometer computation powered by Rust

Project description

allotax

Python bindings for allotax-core — fast allotaxonometer computation powered by Rust via PyO3.

Install

pip install allotax

Usage

import allotax

sys1 = {"types": ["word_a", "word_b", "word_c"], "counts": [100.0, 50.0, 25.0]}
sys2 = {"types": ["word_b", "word_c", "word_d"], "counts": [80.0, 40.0, 20.0]}

# Single alpha — lean display result
result = allotax.compute_allotax(sys1, sys2, alpha=1.0)
# result keys: normalization, delta_sum, diamond_counts, max_delta_loss, wordshift, balance, alpha

# Multiple alphas at once (shared combElems step, Rayon-parallelized)
result = allotax.compute_allotax_multi_alpha(sys1, sys2, alphas=[0.5, 1.0, float("inf")])
# result keys: balance, alpha_results

# Full intermediate data (for custom downstream processing)
result = allotax.compute_allotax_full(sys1, sys2, alpha=1.0)
result = allotax.compute_allotax_multi_alpha_full(sys1, sys2, alphas=[0.5, 1.0])

API

Function Returns
compute_allotax(sys1, sys2, alpha, wordshift_limit=200) Lean display dict for a single α
compute_allotax_full(sys1, sys2, alpha) Full intermediate result for a single α
compute_allotax_multi_alpha(sys1, sys2, alphas, wordshift_limit=200) Lean display dict for multiple α values
compute_allotax_multi_alpha_full(sys1, sys2, alphas) Full intermediate result for multiple α values
rank_turbulence_divergence(ranks1, ranks2, counts1, counts2, alpha) RTD only (pre-combined data)

Input systems are plain dicts with "types" (list of str) and "counts" (list of float).

References

Gallagher et al. (2021). Generalized word shift graphs. EPJ Data Science, 10(1), 4.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

allotax-0.3.0-cp313-cp313-manylinux_2_34_x86_64.whl (352.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

allotax-0.3.0-cp311-cp311-manylinux_2_34_x86_64.whl (353.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file allotax-0.3.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for allotax-0.3.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4a2aa590d62a3017922f8dd4003dd73cef830661d3b7ec8e8532008e858bd339
MD5 b3f3b54849076e8b9e22321023cb66c9
BLAKE2b-256 9a1594e03aefb4570fb1493a50d435447fd97d8272006c2131810dbf7a6cb8db

See more details on using hashes here.

File details

Details for the file allotax-0.3.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for allotax-0.3.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d267a5d04dfde94658c5b8e1ddc30ad991024d48483ba5fff6920057789c029a
MD5 5d51a9410da68363c0453f2759f69250
BLAKE2b-256 b602509f226e9a56ac162e976c3ccbf8ba9de345af94555818999795e99bffb7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page