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.1.0-cp313-cp313-manylinux_2_34_x86_64.whl (338.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

allotax-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl (339.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for allotax-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c4de881c5552ef818ef178493fc0a0e27f00f6ac4a9d160aa31a8a3619935838
MD5 6c8a78d79b993a9fd2c8a20fc196156d
BLAKE2b-256 ef1348718754f5da4ebb6f161b22b5c3fa1872c81e4b28207ca998d897f5cf37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for allotax-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 750a243c127add28cbd1cbb3377b1793875026e19a207e2bf6a7539c35fc2b92
MD5 1025cf9607af3d52b4d2b163c8691502
BLAKE2b-256 c52c859333020c3831d543574c32b628edb9a0c3dd28d02a24c8de81b2c507dc

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