word_string = '''Last week I went to the theatre.
I had a very good seat.
The play was very interesting.
I did not enjoy it.
A young man and a young woman were sitting behind me.
They were talking loudly.
I got very angry.
I could not hear the actors.
I turned round.
I looked at the man and the woman angrily.
They did not pay any attention.
In the end, I could not bear it.
I turned round again.
"I can't hear a word!" I said angrily.
It's none of your business," the young man said rudely.
"This is a private conversation!"
'''
text_list = word_string.split()
text_list = [w.strip('.,"!') for w in text_list]
word_freq_dict = {}
for word in text_list:
if word not in word_freq_dict: #如果单词不在字典的键中
word_freq_dict[word]=1 #新增这个键值对
else:
word_freq_dict[word]=word_freq_dict[word]+1 #将值增加1