# Split text into words words = text.split()
# Load Quran text file with open('quran_text.txt', 'r') as file: text = file.read() the top 500 repeated words in quran pdf
# Preprocess text (remove punctuation, convert to lowercase, etc.) text = re.sub(r'[^\w\s]', '', text).lower() # Split text into words words = text
import re from collections import Counter convert to lowercase