Skip to main content

Library to extract only letters from text using Unicode-safe regular expressions

Project description

Створи віртуальне оточення

python -m venv venv source venv/bin/activate # для Mac/Linux .\venv\Scripts\activate # для Windows

.gitignore

не забудь додати віртуальне оточення до файлу .gitignore

#Extractor

📌 Python-бібліотека обробляє 2 випадки:

  1. виділення лише літер з тексту(працює з латиницею, кирилицею та іншими Unicode-символами). Гнучкість: зібрати в рядок, порахувати частоту, згрупувати тощо. Підходить для unit-тестів та NLP задач.
  2. Працює у звʼязці з першою функцією та повертає рядок, який складається лише з літер.

Встанови build та twine пакети

команда python -m pip install build build - збирає твою бібліотеку у форматах .tar.gz та .whl

команда pip install twine twine - Завантажує зібрані пакети на PyPI або TestPyPI

або встанови одночасно за допомогою pip install build twine

Встанови пайтест

командою pip install pytest та запусти командою pytest тести. Якщо видає помилку E ModuleNotFoundError: No module named Встанови з кореня проєкту "пакет у поточній версії, але з посиланням на локальні файли" командою pip install -e .. Тепер pytest з будь-якої точки буде бачити <твій пакет>.

Example

from extractor import extract_letters_list

text = "Привіт! Hello, world123!!!"
print(extract_letters_list(text))
# ["П", "р", "и", "в", "і", "т", "H", "e", "l", "l", "o", "w", "o", "r", "l", "d"]


from extractor import extract_letters
text = "Привіт! Hello, world123!!!"
return "".join(extract_letters_list(text))
"ПривітHelloworld"

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

letter_extractor-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

letter_extractor-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file letter_extractor-0.1.0.tar.gz.

File metadata

  • Download URL: letter_extractor-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for letter_extractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39d57b00dc1b9cc6af8954efe278be77b2d6b6decc2e01c407a04e0d9651702d
MD5 cbe370d50e0fddd7dc5d681e1a6af9d0
BLAKE2b-256 68422be1faa571a1f53c5b8df6e13def15290293664f0038c695dfcad25b6cb8

See more details on using hashes here.

File details

Details for the file letter_extractor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for letter_extractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51a2f775d20ee957a95fb07bf448b4eb7d030bcf7c3c9a5c57c64bb30c5a7ac7
MD5 949877c8e24a2eca51f63e59b962dd38
BLAKE2b-256 9635ffc0d132568bc798b08c966eafcb3cd3cf7103aa00ff91812d1ace8bfef2

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