поиск макс также по латинице (max) в последнем предложении
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 29s
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 29s
This commit is contained in:
parent
649cd8cc33
commit
0115a8fc72
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue