From 36f4e9491c44c0c205a21d2a35e38df6f678ee8c Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 24 Oct 2021 00:12:19 -0400 Subject: [PATCH] [U] A3 P3 Q2 B --- assignments/a3/a3_part3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignments/a3/a3_part3.py b/assignments/a3/a3_part3.py index 2d964d8..8b37b2a 100644 --- a/assignments/a3/a3_part3.py +++ b/assignments/a3/a3_part3.py @@ -79,7 +79,7 @@ def clean_text(text: str) -> list[str]: text = str.replace(text, p, ' ') # Convert text to lowercase - str.lower(text) + text = text.lower() # Split text into words and return return str.split(text) @@ -95,7 +95,7 @@ def count_keywords(word_list: list[str]) -> dict[str, int]: if word in WORD_TO_INTENSITY: if word not in occurrences_so_far: occurrences_so_far[word] = 0 - occurrences_so_far[word] = occurrences_so_far[word] + 1 + occurrences_so_far[word] += 1 return occurrences_so_far