Skip to main content

wtok: rebalance training sets for whisper

PyPI Changelog Tests License

Count and truncate text based on tokens one sentence at a time

Background

Whisper models conditional distributions of a token given a sequence of past tokens

This tool can count tokens, using OpenAI's tiktoken library.

It can also truncate text to a specified number of tokens.

Installation

Install this tool using pip:

pip install wtok

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd wtok
python -m venv venv
source venv/bin/activate

Now install for editing:

pip install -e .

Metadata

Release files for wtok 0.6.1

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

Source distribution (sdist)

Source distribution for wtok 0.6.1
File Size Uploaded
wtok-0.6.1.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wtok 0.6.1
File Interpreter ABI Platform
wtok-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / wtok-0.6.1.tar.gz

Download URL wtok-0.6.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1818c7ed042c363a875c2003d20f7074ee7e3a36afbbd90bc2c0793390edabb5
BLAKE2b-256 checksum
How to use checksums
74b5f6a7cedf474bfc54d15382069e77ebc5ac584347ccc2e02f9ec291dd7abd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / wtok-0.6.1-py3-none-any.whl

Download URL wtok-0.6.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd183662b7ee2d16551be004c1a365ff865f7d065f8ac8ac0a86670514953905
BLAKE2b-256 checksum
How to use checksums
5a89004e54afdded7ec9fd8fd1f7d3f739257a36187514a8bede7a8ca08855e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6

2 release files

0.5.1

2 release files

0.5

2 release files

0.4

2 release files

0.3

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