Skip to main content

TrTokenizer 🇹🇷

Python PyPI

TrTokenizer is a complete solution for Turkish sentence and word tokenization with extensively-covering language conventions. If you think that Natural language models always need robust, fast, and accurate tokenizers, be sure that you are at the the right place now. Sentence tokenization approach uses non-prefix keyword given in 'tr_non_suffixes' file. This file can be expanded if required, for developer convenience lines start with # symbol are evaluated as comments. Designed regular expressions are pre-compiled to speed-up the performance.

Install

pip install trtokenizer

Usage

from trtokenizer.tr_tokenizer import SentenceTokenizer, WordTokenizer

sentence_tokenizer_object = SentenceTokenizer()  # during object creation regexes are compiled only at once

sentence_tokenizer_object.tokenize(<given paragraph as string>)

word_tokenizer_object = WordTokenizer()  # # during object creation regexes are compiled only at once

word_tokenizer_object.tokenize(<given sentence as string>)

To-do

  • Usage examples (Done)
  • Cython C-API for performance (Done, build/tr_tokenizer.c)
  • Release platform specific shared dynamic libraries (Done, build/tr_tokenizer.cpython-38-x86_64-linux-gnu.so, only for Debian Linux with gcc compiler)
  • Limitations
  • Prepare a simple guide for contribution

Resources

Metadata

Release files for trtokenizer 0.0.3

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

Source distribution (sdist)

Source distribution for trtokenizer 0.0.3
File Size Uploaded
trtokenizer-0.0.3.tar.gz 6.7 kB Details

Built distribution (wheel)

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

Total release size: 14.3 kB

Release files / trtokenizer-0.0.3.tar.gz

Download URL trtokenizer-0.0.3.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8100eca1c1c4dcfdd2ec13aef6606c6a4f54d9e9318107bd5cf31d3642ed66fd
BLAKE2b-256 checksum
How to use checksums
f5bb38488f537662d0e25b7a77c529bebb87e8f43336730b391ad2c71ca00283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

Release files / trtokenizer-0.0.3-py3-none-any.whl

Download URL trtokenizer-0.0.3-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8afab11883ad97f5f8b91d994c2c0c8e8044980e09f6a6ba1cfb6a4fa0528027
BLAKE2b-256 checksum
How to use checksums
f1fae3df3c1523ff16a69b10a0e5bda08d9321bd459966bc4cff8ef624166136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

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