import nltk
import os
import pandas as pd
import re

# Define tokenize function
def tokenize_Text(text):
    tokens = nltk.word_tokenize(text.lower())
    # Insert only words
    tokens = [word for word in tokens if word[0].isalpha()]
    return tokens

# List to hold the results
text_tokenized = []

# Iterate through all the text
for novel in textContent:
    # Clean the text
    text_tokenized.append(tokenize_Text(novel))

# Create a list to store all the results
wordFrequencyList = []

# For novel get the word frequency
for novel in text_tokenized:
    wordFrequencyList.append(nltk.FreqDist(novel))