From 01ef35be4bf1d524b5ddd1cb88527e2172924bb2 Mon Sep 17 00:00:00 2001 From: Tibyan Khalid <93471793+TibyanKhalid@users.noreply.github.com> Date: Sat, 11 Jan 2025 21:13:56 +0200 Subject: [PATCH] Delete word_frequency.py Was pushed by mistake --- word_frequency.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 word_frequency.py diff --git a/word_frequency.py b/word_frequency.py deleted file mode 100644 index 33cfa865f..000000000 --- a/word_frequency.py +++ /dev/null @@ -1,21 +0,0 @@ -# word_frequency.py - - -def count_word_frequency(text): - """ - Function to count the frequency of each word in a given text. - - Args: - text (str): Input text where word frequency needs to be counted. - - Returns: - dict: A dictionary with words as keys and their frequencies as values. - """ - word_count = {} - words = text.split() - - for word in words: - word = word.lower() # Optional: to make the count case-insensitive - word_count[word] = word_count.get(word, 0) + 1 - - return word_count