[U] A3 P3 Q2 B

This commit is contained in:
Hykilpikonna
2021-10-24 00:12:19 -04:00
parent 9853230891
commit 36f4e9491c
+2 -2
View File
@@ -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