Fast text processing for python
Run
cd /[project_path] docker build -t retexto . docker run -v $(pwd):/retexto:rw -it retexto bash
Basic Use
if __name__ == '__main__':
s = '@Edux87, i need this www.google.com | https://github.com <br> \
<strong>UserName: çarlos </strong> \
i\'m from Perú 😛 \
#Friends #Text jajajajaja so fffunny \
loooveee thiiis 😌😎 \
@florenciaflor19 Si!!! sé vo… 🐷JUANA🐷 \
smile! haha jejeje jojojo jujuju jijijijajaja 😂'
text = ReTexto(s)
s = text.remove_html() \
.remove_mentions() \
.remove_tags() \
.remove_smiles(by='SMILING') \
.convert_specials() \
.convert_emoji() \
.remove_nochars(preserve_tilde=True) \
.remove_url() \
.remove_duplicate(r='a-jp-z') \
.remove_duplicate_vowels() \
.remove_duplicate_consonants() \
.remove_punctuation() \
.remove_multispaces() \
.lower() \
.remove_stopwords() \
.split_words(uniques=True)
print(s)
['username', 'from', 'love', 'i', 'ned', 'funy', 'juana', 'vo', 'this', 'si', 'im', 'se', 'peru', 'smile', 'so', 'smiling', 'carlos']
Metadata
Release files for retexto 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| retexto-1.6.1.tar.gz | 26.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| retexto-1.6.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 76.7 kB
Release files / retexto-1.6.1.tar.gz
| Download URL | retexto-1.6.1.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
daa0e34c80de90b64404f10e00f851f24c63186f6e62af3c90b3d0ee9ba3de05
|
|
BLAKE2b-256 checksum How to use checksums |
36eb5d05d6c65cc715f0f0c03d809ef7972b2e05b9a712d84811569cd82b815f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1
|
Release files / retexto-1.6.1-py2.py3-none-any.whl
| Download URL | retexto-1.6.1-py2.py3-none-any.whl |
|---|---|
| Size | 50.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6e5860ece62f264476f244f0fab4eefd88041d186ffebd7cb74cb79179855b1e
|
|
BLAKE2b-256 checksum How to use checksums |
49507ab2978004df996e373416b141c036c7ade565a027748050c2589e6ef873
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1
|