Skip to main content

Easy-Tokenizer

Description

Most tokenizers are eithor too cumbersom (Neural Network based), or too simple. This simple rule based tokenizer is type, small, and sufficient good. Specially, it handles long strings very often parsed wrong by some simple tokenizers, deal url, email, long digits rather well.

Try with the following script:

easy_tokenizer -s input_text

or

easy_tokenizer -f input_file

CI Status

https://travis-ci.org/tilaboy/easy-tokenizer.svg?branch=master Documentation Status Updates

Requirements

Python 3.6+

Installation

pip install easy-tokenizer

Usage

  • easy-tokenizer:

    input:

    • string: input string to tokenize

    • filename: input text file to tokenize

    • output: output filename, optional. print out to STDOUT when not set

    output:

    • a sequence of space separated tokens

examples:

# string input
easy-tokenizer -s "this is   a simple test."

easy-tokenizer -f foo.txt
easy-tokenizer -f foo.txt -o bar.txt

output will be “this is a simple test .”

Development

To install package and its dependencies, run the following from project root directory:

python setup.py install

To work the code and develop the package, run the following from project root directory:

python setup.py develop

To run unit tests, execute the following from the project root directory:

python setup.py test

Metadata

Release files for easy-tokenizer 0.0.10

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

Source distribution (sdist)

Source distribution for easy-tokenizer 0.0.10
File Size Uploaded Provenance Actions
easy_tokenizer-0.0.10.tar.gz 21.3 kB Without provenance Details for easy_tokenizer-0.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for easy-tokenizer 0.0.10
File Interpreter ABI Platform Actions
easy_tokenizer-0.0.10-py2.py3-none-any.whl Python 3, Python 2 none any Details for easy_tokenizer-0.0.10-py2.py3-none-any.whl

Total release size: 30.3 kB

Release files / easy_tokenizer-0.0.10.tar.gz

Download URL easy_tokenizer-0.0.10.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d2da094a2e61637ae4db1d6fe5ae85ad6596e056a7c59f2d094d2ab31d937c63
BLAKE2b-256 checksum
How to use checksums
2c946712dd75e5ace020714c98e6a17303fa1b5d4588e1f252deb88cde9bcf1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.4.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.4

Release files / easy_tokenizer-0.0.10-py2.py3-none-any.whl

Download URL easy_tokenizer-0.0.10-py2.py3-none-any.whl
Size 8.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
29577595625fbbba7325a28dbb8d3f25510e01abbf38fd81b5e50c4666e02f52
BLAKE2b-256 checksum
How to use checksums
111634cfdbbe64c1e7649d4f57eb009a3e7b558f8ff0271417c16f53baea14fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.4.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.4

Security for easy-tokenizer 0.0.10

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