I'm a beginner in python. I have a text file where I'm supposed to find words that are connected in the text. They are "connected" if they appear in the same sentence more than once.
split_sentences=[]
for sentence in sentences:
split_sentences.append(sentence.split())
print(split_sentences)
split_sentences is the text file I'm going to use (I have splitted the sentences into words, but still keeping them seperate as sentences). Now, I'm going to use dictionaries to go through each word in every sentence and see if words appear in the same sentence more than once. Do any of you guys know how to execute this with the use of dictionaries?