Skip to main content

No project description provided

Project description

This project is derived from the Python port of Zemberek by Loodos, which is itself based on the original Zemberek Java project by Ahmet A. Akın and Mehmet D. Akın.

Goal of pre_bpe_morph

This package recognizes verbs, nouns, and named entities and their suffixes. Before BPE, this package removes suffixes and replaces them with their respective special tokens for identifiability. It also precedes a word type (Verb/Noun/NamedEntity) before any set of suffixes. The goal is to simplify Turkish grammar rules for small language models.

Usage

from pre_bpe_morph_tr import MorphTokenizer
tokenizer=MorphTokenizer("<|", "|>")

tokenizer.tokenize("gülüveriniz")
# response: ['g', 'ü', 'l', '<|Verb|>', '<|Hastily|>', '<|Req|>']

tokenizer.detokenize(['k', 'o', 'ş', '<|Verb|>', '<|Fut|>', '<|A1sg|>'])
# response: "koşacağım"

Developed for language model

Since this is developed for LM training, I tried to avoid preprocessing text (like converting "hal" to "hâl", or lowercasing words). The text should remain unchanged when encoded and then decoded.

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

pre_bpe_morph_tr-0.1.2.tar.gz (95.2 MB view details)

Uploaded Source

Built Distribution

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

pre_bpe_morph_tr-0.1.2-py3-none-any.whl (94.9 MB view details)

Uploaded Python 3

File details

Details for the file pre_bpe_morph_tr-0.1.2.tar.gz.

File metadata

  • Download URL: pre_bpe_morph_tr-0.1.2.tar.gz
  • Upload date:
  • Size: 95.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pre_bpe_morph_tr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7f7ff511c03b3ba5d093322cc6a9c46840ae88baabc9f8122f382c39f5c0d52e
MD5 9d8cf2961f656b772d2ba9270af488f5
BLAKE2b-256 b52f6b961d0a0f8525ef9e98ec0694db52959326859ef03fc0fe45514642b22a

See more details on using hashes here.

File details

Details for the file pre_bpe_morph_tr-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pre_bpe_morph_tr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b68a89891c6445731d9edb46c5306e1707c8a8128ec1431652bdd5f767f46e29
MD5 1d3aa75e065fd8221d1f26b3dab9212a
BLAKE2b-256 4a0f27ef7d2b92ee5e486bfcb3090886230aea859e208361c554e58cccf9739a

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