diff --git a/dogfood/topwords/core.py b/dogfood/topwords/core.py index d5b69a4..0a3baba 100644 --- a/dogfood/topwords/core.py +++ b/dogfood/topwords/core.py @@ -3,5 +3,5 @@ def top_words(text, k): """The k most frequent words, most frequent first, ties alphabetical.""" - counts = Counter(text.split()) + counts = Counter(text.lower().split()) return [w for w, _ in sorted(counts.items(), key=lambda x: (-x[1], x[0]))[:k]]