Skip to main content

Supercharge text processing

Project description

Texy: A conservative text processing library


Python PyPI - Version

A utility library for quickly cleaning texts

Installation

Python version in the dev environment: 3.11.5

pip install -U texy

Usage

Pipelines with parallelization in Rust:

>>> from texy.pipelines import extreme_clean, strict_clean, relaxed_clean
>>> data = ["hello ;/ from the other side 😊 \t "]
print(extreme_clean(data))
>>> ['hello from the other side']
print(strict_clean(data))
>>> ['hello ;/ from the other side']
print(relaxed_clean(data))
>>> ['hello ;/ from the other side 😊']

Parallelize custom functions with Python Multiprocessing:

from texy.pipelines import parallelize

def dummy(x):
    return [i[0] for i in x]

data = ["a ", "b ", "c ", "d ", "e ", "f ", "g ", "h ?."] * 100
print(parallelize(dummy, data, 2))

Actions

Pipeline Actions
relaxed_clean remove_newlines, remove_html, remove_xml, merge_spaces
strict_clean remove_newlines, remove_urls, remove_emails, remove_html, remove_xml, remove_emoticons, remove_emojis, remove_infrequent_punctuations, merge_spaces
extreme_clean remove_newlines, remove_urls, remove_emails, remove_html, remove_xml, remove_emoticons, remove_emojis, remove_all_punctuations, merge_spaces

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

texy-0.0.2.tar.gz (21.1 kB view details)

Uploaded Source

Built Distributions

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

texy-0.0.2-cp311-abi3-musllinux_1_2_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

texy-0.0.2-cp311-abi3-manylinux_2_28_x86_64.whl (823.0 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

texy-0.0.2-cp311-abi3-macosx_11_0_arm64.whl (697.8 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: texy-0.0.2.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.3.2

File hashes

Hashes for texy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 222f445138ab88e43a3b736e522d2790827da449156d7681796d6d82b675a8f1
MD5 5126772a8416a9cbed2e0d886d479178
BLAKE2b-256 1f5070899f641d9c12412f73299f08fe7e200783eca88cab5939371421ca87a2

See more details on using hashes here.

File details

Details for the file texy-0.0.2-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for texy-0.0.2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 378e8a122ceb56097227cf39d72419729adf3b997cc2fd37ecf9eb6924b54690
MD5 169d277ad5520352f8605c7ae37f838a
BLAKE2b-256 f34f99abfef931c5a51bb650700f2452399792718047b1f30e6fc236556ca6db

See more details on using hashes here.

File details

Details for the file texy-0.0.2-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for texy-0.0.2-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c83501652645a81c8f0b29425495f54cbd64498117ce5d1ed464f67b6cdd3e64
MD5 c98b9953c9fad4b94494118e01aea946
BLAKE2b-256 c7f8b62e227a313536b6de535d9e725b417b06552035856e7957ef1e1a1e38f7

See more details on using hashes here.

File details

Details for the file texy-0.0.2-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for texy-0.0.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 124f857f55712d1be4c60cb511582f6a83df48a2c14f95fb8c445233b4e65eea
MD5 9d61ce857d738c345aae102f877746d8
BLAKE2b-256 cdefb1e7ee4a0c86541baec674e6ab36fec0bbd526daee3144b15c47d41019d7

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