Skip to main content

Take Text Pre-Process

This package is a tool for pre-processing a sentence.

The basic functionality available in this packages are:

  • Converting to lower case
  • Remove non ascii characters
  • Add space between punctuation and word

The customize functionality available are:

  • Replace URL by a token
  • Replace Email by a token
  • Replace Numbers by a token
  • Replace Code (Number and letters) by a token
  • Remove symbols
  • Replace abbreviations

Installation

The TakeTextPreProcess can be installed from PyPi:

pip install take-text-preprocess

Usage

Basic pre-process

To use the basic pre-process:

from take_text_preprocess.presentation import pre_process
sentence = 'Bom dia, meu ẞ caro'
pre_process(sentence)

Customize pre-process

To use the customize pre-process is needed a input with a list of all pre-process you wanted to use.

The following examples show all the customized pre-processes available.

  • URL
from take_text_preprocess.presentation import pre_process
optional_tokenization = ['URL']
sentence = 'Bom dia, meu https://www.take.net  caro'
pre_process(sentence, optional_tokenization)
  • EMAIL
from take_text_preprocess.presentation import pre_process
optional_tokenization = ['EMAIL']
sentence = 'Bom dia, meu teste@gmail.com  caro'
pre_process(sentence, optional_tokenization)
  • NUMBER
from take_text_preprocess.presentation import pre_process
optional_tokenization = ['NUMBER']
sentence = 'Este é um número 99999-9999'
pre_process(sentence, optional_tokenization)
  • CODE
from take_text_preprocess.presentation import pre_process
optional_tokenization = ['CODE']
sentence = 'Este é um código 91234abc'
pre_process(sentence, optional_tokenization)
  • SYMBOLS
from take_text_preprocess.presentation import pre_process
optional_tokenization = ['SYMBOL']
sentence = 'Este é um símbolo %'
pre_process(sentence, optional_tokenization)
  • ABBREVIATIONS
from take_text_preprocess.presentation import pre_process
optional_tokenization = ['ABBR']
sentence = 'Este é uma abreviação vc'
pre_process(sentence, optional_tokenization)

Contribute

If this is the first time you are contributing to this project, first create the virtual environment using the following command:

conda env create -f env/environment.yml

Then activate the environment:

conda activate taketextpreprocess

To test your modifications build the package:

pip install dist\take-text-preprocess-VERSION-py3-none-any.whl --force-reinstall

Then run the tests:

pytest

Metadata

Release files for take-text-preprocess 0.0.5

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

Source distribution (sdist)

Source distribution for take-text-preprocess 0.0.5
File Size Uploaded Provenance
take-text-preprocess-0.0.5.tar.gz 8.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for take-text-preprocess 0.0.5
File Interpreter ABI Platform
take_text_preprocess-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 35.2 kB

Release files / take-text-preprocess-0.0.5.tar.gz

Download URL take-text-preprocess-0.0.5.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5efb5c359059c704ef210492ddea756c0490907c9f2f4d1aec9edb57449e9a04
BLAKE2b-256 checksum
How to use checksums
1e3d591c74accc100509eff8d67431eafdb470a02c21ed3b7a3fb6825a9217aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.6

Release files / take_text_preprocess-0.0.5-py3-none-any.whl

Download URL take_text_preprocess-0.0.5-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fe6858b65f8ae0a42aca62796ce62c3f64439aa3ad68632d0fc876a061ec769
BLAKE2b-256 checksum
How to use checksums
ed9da6fc8af2684e74becc9f0dc9cd2f2e33e627e82532b97458623cdff691ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.6

Security for take-text-preprocess 0.0.5

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