Files
telegram_expenses_controller/app/preprocessing/normalize_text.py

12 lines
240 B
Python

"""
Text normalization functions.
"""
def normalize_text(text: str) -> str:
"""
Normalizes a string by converting it to lowercase and stripping whitespace.
"""
if not text:
return ""
return text.lower().strip()