# d = load_record('static/frequency/frequency_sb.pickle')
# print(d)
# # d = load_record('frequency_mrlan85.pickle')
# # print(d)
#
# # user = UserVocabularyLevel(d)
# user = UserVocabularyLevel({})
# print('用户词汇水平:')
#
# print(user.level) # level is a property
# s = """ energetic = haze dynamic = vigorous = animated Such is Love , Plain like Water
# port him to stand up. She scolded him for nothaving waken her up. He said that he could manage. A serious quarrel was about to burst outagain.
# I called them from Zhuhai, the beautiful city of relaxation8 and exciting views. I wanted to depict9 tothem how pretty a city Zhuhai is. He was surprised that I had travelled such a great distance, towhere he and she had never been all their life. He then believed that I had accomplished10 a bigsuccess, and that I had significantly broadened my horizons. He went on talk in honor of me, voicetrembling with pride; she was beside him, excited all the same. They did not mention anythingabout the family change and their suffering.
# I had not heard about his being bit by a snake until she told me her grievance.
# “He treated me bad again. He could not get out of bed by himself, but he wanted to be strong, andso he fell. I was trying to pull him up on his feet, and I just told a few words of complaints whenhe got out of bed, yelling that I was clumsy.”
# ."""
# article = ArticleVocabularyLevel(s)
# print('文章词汇难度:')
# print(article.level)
#
# s="""Every once in a while I will dial the familiar number.
# It is usually he that picks up the phone. She will come up to him asking who the caller is. Knowingit’s me, she will grab the phone, say a few greeting words, and then start talking bad of him,complaints flooding out, all about chores and minor1 superficial details.
# As always, he argues, and through the long-distance call I hear them quarreling seriously.
# Quarreling seems to be bound with their life. He seems like a capricious boy, and she a little girlwho cannot bear with even a small grievance2. It is common that they fight each other half a dayover minor issues. Over and over again, they will quarrel—they are born to disagree with eachother.
# Bored sometimes, I pretend to be very unhappy and yell, “Couldn’t you stop arguing and let myears have a quiet moment?”
# She pauses two seconds, and mumbles3, “He always bullies4 me.” I almost see her, pitiful as she is.
# Then I turn soft, and try to find faults in him.
# “Why did you bully5 her?”
# He listens to me, irritated, “Who bullies her? It is she that bullies me!”
# Just as the saying goes, a righteousjudge is never able to decide who is right and who is wrong inan argument between a couple. I tried to intervene, only to get them into more serious debate.
# Like an actor and an actress, they are indulged in acting6. With me watching, they end up in moreheated disagreements. So I don’t want to bother any more. I just stand by when they quarrel.
# In the end, she will find her eyes red, and wipe tears off her cheeks. He gets upset and attempts tosoothe her.?He looks funny—staring at her like a mad frog with two eyes open wide, he yells withdetermination,
# “From now on I will wash all the dishes.” He seems to be swearing. And she weeps and smilingflowers bloom on her face.
# One day he got bit by a snake while working in the farmland, one leg swelling7 furiously. He wasthen rushed to hospital where he went through a series of torment—he got injected to let thecontaminated blood out.
# Seeing the blood, she was scared to big tears, crying loud.
# “Stop it. That’s enough. You are getting on my nerves. I am not gonna die.” He shouted, frowning.
# She got mad at the word “die” that he had mentioned.
# “Why did you say that?” She immediately quarreled hard with him, not to stop for a long while.
# Doctors were watching on, amused.
# “Isn’t quarreling more effective than pain-killing pills?” The doctors teased.
# They looked at each other, embarrassed and laughing. That finally stopped their quarreling.
# In order to save hospital expenses, he insisted on going home despite her mad disagreements.
# Lying in bed, he was having an intravenous drip for a continuous period of 12 days. She was busydealing with housework and everything else out of home. She was weak and thin, and too muchwork had made her even more skinny.
# Witnessing her change, he hurt in the heart. One night he wanted to drink water. He did not wakeher up, pulled himself out of the bed, and fell over because his legs were too weak.
# His fall actually woke her up. She rushed to support him to stand up. She scolded him for nothaving waken her up. He said that he could manage. A serious quarrel was about to burst outagain.
# I called them from Zhuhai, the beautiful city of relaxation8 and exciting views. I wanted to depict9 tothem how pretty a city Zhuhai is. He was surprised that I had travelled such a great distance, towhere he and she had never been all their life. He then believed that I had accomplished10 a bigsuccess, and that I had significantly broadened my horizons. He went on talk in honor of me, voicetrembling with pride; she was beside him, excited all the same. They did not mention anythingabout the family change and their suffering.
# I had not heard about his being bit by a snake until she told me her grievance.
# “He treated me bad again. He could not get out of bed by himself, but he wanted to be strong, andso he fell. I was trying to pull him up on his feet, and I just told a few words of complaints whenhe got out of bed, yelling that I was clumsy.”
# “No, no, no, she was not telling the truth.”
# He was eager to tell me that she was really silly, that she did not know how to change theintravenous drip bottle. Then they started it over again quarreling. And this time I was listening tothem in good patience, holding the telephone receiver.
# Water was roaring in the sea out the window, waves climbing up and falling down, just like what Iwas feeling at the bottom of my heart.
# He suddenly realized that they should stop. He said that it was a long- distance call. Sheimmediately stopped arguing.
# “Why didn’t you remind me earlier? How much money have we wasted her?”
# She hangs up before I had a chance to talk. I know they would have a good fight again.
# They are my father and mother. He is 66, and she is 64."""
#
# with open('test/article_test.p', 'wb') as file: # 注意使用二进制写模式'wb'
# pickle.dump(s, file)
#
# with open('test/article_test.p', 'rb') as file: # 注意使用二进制读模式'rb'