Aktualizovat u4/word_count.py

This commit is contained in:
Oleksandr Mateshchuk 2026-10-06 12:29:39 +00:00
parent 30624828a4
commit c57e5420b8

View File

@ -5,7 +5,4 @@ from collections import Counter
def word_count(text):
pattern = r"\w+(?:'\w+)?"
words = re.findall(pattern, text.lower())
return dict(Counter(words))