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.2.tar.gz (356.1 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.2-py3-none-any.whl (365.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: IBITTokenizer-0.0.2.tar.gz
  • Upload date:
  • Size: 356.1 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.2.tar.gz
Algorithm Hash digest
SHA256 3cdb5f5c3643320a981bee1bf7ea2826a2fb4160fe45b849ce2c0ad3e6a13488
MD5 7185e5e1475759536338127dda619fb4
BLAKE2b-256 f98ab478cd41603b2dd513ed01bf651af1c44bab6e42c34d16ee9801504cc0a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: IBITTokenizer-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 365.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9794446823f5f9b520ec3ead4519a544b0d32c8a8c1f54a18c42d2dcd32b1b52
MD5 50abc118ee99434c3052733334b75422
BLAKE2b-256 7abb729f6df37de60a9d3d8986353a5befd5a8e22f015537e7dbeb98e67de50e

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