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

Встанови пакет командою

pip install letter-extractor

Extractor

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

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

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.1.tar.gz (3.3 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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: letter_extractor-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 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.1.tar.gz
Algorithm Hash digest
SHA256 ae8ffda5d9aab902c1addd1f82873a4fda99f4d76153635fb1cadb8cf0a606bb
MD5 cc00f32da550e4a58f12b6ebc6afa5c7
BLAKE2b-256 a353043134ebdb2ffe08865db264fcb1c667d6c93a2ec249fa4ebeed84ab8b5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for letter_extractor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ee60082240c7f7f3d954d3371b43f9518cb7d0036ee33c00d4a6b1ba5d320de
MD5 5079feffaae7154a301653104f2aa930
BLAKE2b-256 3930850119c4f69ffecc26ed332ea47e2e0b5af0c302f36a4c711a633338eb19

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