Skip to main content

Tokenizer for Persian texts based on hazm

Project description

IBITTokenizer

Simple persian text-tokenizer base on tokenizers lib

install

pip install IBITTokenizer --upgrade

import

from IBITTokenizer.tokenizer import IBITTokenizer

usage

ibit_tokenizer = IBITTokenizer()
tokenizer = ibit_tokenizer.huggingface_tokenizer()

text = "سلام خوبی"

encoded = ibit_tokenizer.encode(text)
decoded = ibit_tokenizer.decode(encoded.ids)
tokenized = ibit_tokenizer.tokenize(text)

print(encoded)
print(decoded)
print(tokenized)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

IBITTokenizer-0.0.1.tar.gz (369.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

IBITTokenizer-0.0.1-py3-none-any.whl (380.1 kB view details)

Uploaded Python 3

File details

Details for the file IBITTokenizer-0.0.1.tar.gz.

File metadata

  • Download URL: IBITTokenizer-0.0.1.tar.gz
  • Upload date:
  • Size: 369.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for IBITTokenizer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ea9b15055f08c3e94b039476b2464db9540e6665ece93c26639a304c93fc6d6a
MD5 48a6e69d2da34c28e211f3c10e93eadf
BLAKE2b-256 046dc534b44dcdbdd885c35444a32380e993e4d252205dad82a8508b09ffcc02

See more details on using hashes here.

File details

Details for the file IBITTokenizer-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: IBITTokenizer-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 380.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for IBITTokenizer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b91ec285e73ba420ba387be5e4e01df94cf6c29e35d078d06c994ffec99be4a
MD5 e21f69fe95435a891b062741ff321aad
BLAKE2b-256 41ce68e89d4be9dc999a321dc83dd4da413d89e3f8a5e4cc41d7975406c76f1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page