I have this code who work well but is there a way to make my code go faster ? ```py
def count_number_of_letter_in_a_word(word):
return sum(letter.isalpha() for letter in word.lower())
def count_occurrences_in_text(word, text):
SplitString = text.lower().replace("."," ").split()
WordOccurences = 0
if " " in word and len(word) > 1 :
return(text.lower().count(word.lower()))
for words in SplitString:
if " " not in word:
if word.lower() in words and len(word) > 1 and count_number_of_letter_in_a_word(word) == count_number_of_letter_in_a_word(words) and "'" not in words:
WordOccurences+=1
elif word.lower() in words and len(word) > 1 and count_number_of_letter_in_a_word(word) == count_number_of_letter_in_a_word(words) and text[0] == "'" and text[-1] == "'":
WordOccurences+=1
elif word.lower() == words:
WordOccurences+=1
return WordOccurences