Skip to main content

PyPI version License: MIT Downloads LinkedIn

Tokeniser

Tokeniser is a lightweight Python package designed for simple and efficient token counting in text. It uses regular expressions to identify tokens, providing a straightforward approach to tokenization without relying on complex NLP models.

Installation

To install Tokeniser, you can use pip:

pip install tokeniser

Usage

Tokeniser is easy to use in your Python scripts. Here's a basic example:

import tokeniser

text = "Hello, World!"
token_count = tokeniser.estimate_tokens(text)
print(f"Number of tokens: {token_count}")

This package is ideal for scenarios where a simple token count is needed, without the overhead of more complex NLP tools.

Features

  • Simple and efficient token counting using regular expressions.
  • Lightweight with no dependencies on large NLP models or frameworks.
  • Versatile for use in various text processing tasks.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

This project is licensed under the MIT License.

Metadata

Release files for tokeniser 2025.5.190811

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

Source distribution (sdist)

Source distribution for tokeniser 2025.5.190811
File Size Uploaded Provenance Actions
tokeniser-2025.5.190811.tar.gz 2.9 kB Without provenance Details for tokeniser-2025.5.190811.tar.gz

Built distribution (wheel)

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

Total release size: 6.3 kB

Release files / tokeniser-2025.5.190811.tar.gz

Download URL tokeniser-2025.5.190811.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0b0e43e95ea421135e4787de327c79a4b0023c4e1e0247bc0aa274f320b1c67f
BLAKE2b-256 checksum
How to use checksums
49f21c20f1fca1a970310794e7746ee5b8a824d302c4f4d6d55b6ac8a2e8b07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.11

Release files / tokeniser-2025.5.190811-py3-none-any.whl

Download URL tokeniser-2025.5.190811-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfd85a9634282ac049ef12b6380868f208c19b87d4c1a68a60f868d7e1745b6d
BLAKE2b-256 checksum
How to use checksums
93bff37cc689b528e455dab8327f9eedcfd4af8373f2e51ffaeadec79da901b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.11

Security for tokeniser 2025.5.190811

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.

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