Add CI pipeline for variant 5
Some checks failed
CI / Lint / Ruff (push) Has been cancelled
CI / Test / Pytest coverage (push) Has been cancelled
CI / Build / Poetry package (push) Has been cancelled

This commit is contained in:
lilrax
2026-05-18 00:07:59 +03:00
commit 4544efe463
10 changed files with 477 additions and 0 deletions

16
ci_lab/text_tools.py Normal file
View File

@@ -0,0 +1,16 @@
"""Text helper functions."""
def normalize_text(text: str) -> str:
return " ".join(text.lower().split())
def word_count(text: str) -> int:
normalized = normalize_text(text)
if not normalized:
return 0
return len(normalized.split(" "))
def unique_words(text: str) -> set[str]:
normalized = normalize_text(text)
if not normalized:
return set()
return set(normalized.split(" "))