rita — Python port of RiTa
RiTa is a library for computational language and generative writing, handling syllables, phonemes and stresses, parts of speech, conjugation, pluralization, stemming, letter-to-sound mapping, rhyming and alliteration, plus unbounded n-gram generation and the RiScript scripting language for context-free grammars.
This is the Python port of RiTa from the original js - see the shared API reference here.
Install
pip install rita-py
Usage
from rita import RiTa
RiTa.tokenize("I'm sure he'll be interested")
# ["I'm", "sure", "he'll", "be", "interested"]
RiTa.syllables("elephant") # "eh/l-ah/f-ah-n-t"
RiTa.phones("elephant") # "eh-l-ah-f-ah-n-t"
RiTa.rhymes("cat") # ["bat", "begat", "brat", "chat", ...]
RiTa.pos("The dog ran") # ["dt", "nn", "vbd"]
# RiScript
RiTa.evaluate("the [big | small] [dog | cat]") # "the small dog"
Notes
- Pure Python, no runtime dependencies. Python 3.10+
- Free/libre and licensed under GPL-3.0
Development
The build is managed with uv:
uv sync # create .venv and install dev deps
uv run pytest -q # run the test suite
Metadata
Release files for rita-py 4.1.0
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 | |
|---|---|---|---|---|
| rita_py-4.1.0.tar.gz | 481.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rita_py-4.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 868.3 kB
Release files / rita_py-4.1.0.tar.gz
| Download URL | rita_py-4.1.0.tar.gz |
|---|---|
| Size | 481.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec37ee7ccbb5bbe6d3b4406b03bf0761068ee4a28da2b637faf9707f9bde8d97
|
|
BLAKE2b-256 checksum How to use checksums |
05f77f3c6a51e68ee1e267620e0d9e53b0ce31e37d55d7552e5ae865fa46e162
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / rita_py-4.1.0-py3-none-any.whl
| Download URL | rita_py-4.1.0-py3-none-any.whl |
|---|---|
| Size | 386.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d64eb66b9641b49eceadfb4ec72b6168c2f61f7fc5fdae585d7d0459d92c2001
|
|
BLAKE2b-256 checksum How to use checksums |
377eaddb499613fdbfd586f029b21c4f4eec7eac6a82c22003ecd47b9838fda3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for rita-py 4.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.