Skip to main content

Usage Sample ''''''''''''

.. code:: python

    from xtokenizer import Tokenizer

    tokenizer = Tokenizer.from_texts(texts, min_freq=5)
    sent = 'I love you'
    tokens = tokenizer.encode(sent, max_length=6)
    # [101, 66, 88, 99, 102, 0]
    sent = tokenizer.decode(tokens)
    # ['<BOS>', 'I', 'love', 'you', '<EOS>', '<PAD>']

Release files for xtokenizer 0.0.5

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

Source distribution (sdist)

Source distribution for xtokenizer 0.0.5
File Size Uploaded
xtokenizer-0.0.5.tar.gz 18.9 kB Details

Release files / xtokenizer-0.0.5.tar.gz

Download URL xtokenizer-0.0.5.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1e8fdce129a30ebfa50e816c568478182b47bf744f5e3d0972484e79542ee68f
BLAKE2b-256 checksum
How to use checksums
d464c813f68100d3ab7ff9c7a3db5bd9258524ac8d9327733c54a1622e71bfd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release history Release notifications | RSS feed

0.0.6

1 release file

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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