From e6be377a10fca893f4f2eccf374a57eeafa56d64 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 11 Jan 2021 14:16:19 +0000 Subject: [PATCH] Compare lower case --- posts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts.py b/posts.py index 62069d607..93f197ca3 100644 --- a/posts.py +++ b/posts.py @@ -484,7 +484,7 @@ def _updateWordFrequency(content: str, wordFrequency: {}) -> None: 'need', 'here', 'would', 'these', 'into', 'very', 'well', 'when', 'what', 'your', 'there', 'which', 'even', 'there', 'such', 'just', 'those', 'only', - 'will', 'much' + 'will', 'much', 'than' ) for word in wordsList: wordLen = len(word) @@ -500,7 +500,7 @@ def _updateWordFrequency(content: str, wordFrequency: {}) -> None: continue if word.endswith(':'): word = word.replace(':', '') - if word in commonWords: + if word.lower() in commonWords: continue if wordFrequency.get(word): wordFrequency[word] += 1