From fcef710ed46f425d59445727cfa3fd4ba167145c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 23:39:47 +0000 Subject: [PATCH] dogfood: count words case-insensitively Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KhsqyyRymDrLq3oDvkMopj --- dogfood/topwords/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]]