поиск макс также по латинице (max) в последнем предложении
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 29s

This commit is contained in:
vrubel 2026-06-20 08:32:33 +00:00
parent 649cd8cc33
commit 0115a8fc72

View file

@ -73,7 +73,7 @@ def clean_text(text: str) -> str:
text = text.strip() text = text.strip()
parts = re.split(r'(?<=[.!?])\s+', text) parts = re.split(r'(?<=[.!?])\s+', text)
if parts and re.search(r'макс', parts[-1], re.IGNORECASE): if parts and re.search(r'макс|max', parts[-1], re.IGNORECASE):
text = ' '.join(p.strip() for p in parts[:-1] if p.strip()) text = ' '.join(p.strip() for p in parts[:-1] if p.strip())
if text: if text: