Skip to main content

ZiTokenizer

Tokineze all languages text into Zi.

support 300+ languages from wikipedia, including global

use

  • pip install ZiTokenizer
from ZiTokenizer.ZiTokenizer import ZiTokenizer

# use
tokenizer = ZiTokenizer()  
line = "'〇㎡[คุณจะจัดพิธีแต่งงานเมื่อไรคะัีิ์ื็ํึ]Ⅷpays-g[ran]d-blanc-élevé » (白高大夏國)😀熇'\x0000𧭏20222019\U0010ffff"
indexs = tokenizer.encode(line)
tokens = tokenizer.decode(indexs)
line2=tokenizer.tokens2line(tokens)

# build
demo/unit.py

UnicodeTokenizer

basic tokeinzer

ZiCutter

汉字拆字

'瞼' -> ['⿰', '目', '僉']

ZiSegmenter

word => prefix + root + suffix

'modernbritishdo' -> ['mod--', 'er--', 'n--', 'british', '--do']

languages

default using "golabl" vocob, others from https://laohur.github.io/ZiTokenizer/index.html

tokenizer = ZiTokenizer(vocab_dir)

Metadata

Release files for ZiTokenizer 0.0.8

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

Source distribution (sdist)

Source distribution for ZiTokenizer 0.0.8
File Size Uploaded Provenance Actions
ZiTokenizer-0.0.8.tar.gz 14.8 kB Without provenance Details for ZiTokenizer-0.0.8.tar.gz

Built distribution (wheel)

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

Total release size: 30.0 kB

Release files / ZiTokenizer-0.0.8.tar.gz

Download URL ZiTokenizer-0.0.8.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
801983c24bc1c860b0c7a7337e958a93fa0867a5a16ada7176ddc19e5915e9df
BLAKE2b-256 checksum
How to use checksums
48f4715a0232d01d4dddbe69da973313fcd34b71be165eee14624fb69c62bb2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / ZiTokenizer-0.0.8-py3-none-any.whl

Download URL ZiTokenizer-0.0.8-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a10b259a4681cc961caf67d209ea8c7038db59f4db9872a904acc10de9d15786
BLAKE2b-256 checksum
How to use checksums
e36d3ac57c119e6e5a1927be0680746dfdc222be528962859ac0d9108ac58331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for ZiTokenizer 0.0.8

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