🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

letter-extractor

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

letter-extractor

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

0.1.1
PyPI
Maintainers
1

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

python -m venv venv

source venv/bin/activate # для Mac/Linux

.\venv\Scripts\activate # для Windows

.gitignore

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

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

pip install letter-extractor

Extractor

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

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

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"


FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts