Update u4/word_count.py

This commit is contained in:
Roman Dmytruk 2026-10-07 13:31:44 +00:00
parent 74bbeb731b
commit ee6aa451fe

View File

@ -2,7 +2,7 @@ import re
from collections import Counter
def count_words(text: str) -> dict[str, int]:
text = text.lower
text = text.lower()
words = re.findall(r"[a-z0-9áäčďéíľňóôŕšťúýž]+(?:'[a-z0-9áäčďéíľňóôŕšťúýž]+)?", text)