/
mikedrop
/
Text_analysis
Обзор
Документация
Войти
/
mikedrop
/
Text_analysis
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
utils/preprocessing.py
15 строк
333 B
mikedrop
Create: preprocessing.py, preprocessing.cpython-314.pyc, ___init__.py
11 июн 2026, 20:38
Верифицирован
11 июн 2026, 20:38
a716dd8
Код
Авторство
О чём код?
import nltk from nltk.corpus import stopwords import string stop_words = set( stopwords.words('english')) def preprocess(text): tokens = nltk.word_tokenize(text.lower()) cleaned = [ word for word in tokens if word not in stop_words and word not in string.punctuation ] return cleaned