From 4838dd5e025a37dbf6eae036915835119205da47 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Jul 2021 12:37:37 +0100 Subject: [PATCH] More common words --- posts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts.py b/posts.py index d64a7d696..7349a8566 100644 --- a/posts.py +++ b/posts.py @@ -496,7 +496,7 @@ def _updateWordFrequency(content: str, wordFrequency: {}) -> None: that they appear """ plainText = removeHtml(content) - removeChars = ('.', ';', '?') + removeChars = ('.', ';', '?', '\n') for ch in removeChars: plainText = plainText.replace(ch, ' ') wordsList = plainText.split(' ') @@ -510,7 +510,7 @@ def _updateWordFrequency(content: str, wordFrequency: {}) -> None: 'been', 'over', 'their', 'where', 'could', 'though', 'like', 'think', 'same', 'maybe', 'really', 'thing', 'something', 'possible', 'actual', 'actually', - 'because', 'around', 'having', 'I' + 'because', 'around', 'having' ) for word in wordsList: wordLen = len(word)