Question
This is a java program. One way computer scientists can help is to preserve the stories that have been passed down through the generations through
This is a java program.
One way computer scientists can help is to preserve the stories that have been passed down through the generations through the Blackfoot Indian Folklore. We can examine different stories and discern what is relevant to their culture.
So, in this program, you are going to recursively read through two files and determine the frequency of different words. You should ignore the following terms:
1. the
2. and
3. it
4. a
5. on
6. in
You are to display the top 10 words based on frequency in each file. (You can use the Collections.sort). You should show the word, the frequency (i.e. how many times did it turn up in the document), and what its percentage was to all the words in the text.
Then, you are to determine which words in the top 10 (if any) are common among the two files.
Please use the Mistakes of Old Man.txt and How The Old Man Made People.txt for your files. Your methodology should allow you to read through any document. This is a console application.
Extra Credit: Make it a Graphical program with rectangles
How the Old Man Made People.txt
How the Old Man Made People
Native American Lore
Long ago, when the world was new, there was no one living in it at all, except the Old Man, Na-pe, and his sometimes-friend and sometimes-enemy A-pe'si, the Coyote, and a few buffalo. There were no other people and no other animals. But the Old Man changed all that. He changed it first because he was lonely, and then because he was lazy; and maybe be shouldn't have, but anyway, he did. And this was the way of it.
Na-pe was sitting by his fire one day, trying to think of some way to amuse himself. He had plenty to eat--a whole young buffalo; no need to go hunting. He had a lodge; no work to do; and a fire. He was comfortable, but he wasn't contented. His only companion, A-pe'si the Coyote, was off somewhere on some scheme of his own, and anyway he had quarrelled with A-pe'si, and they were on bad terms; so even if he had been there, Old Man would still have been lonely. He poked some sticks in the fire, threw a rock or two in the river, Lit his pipe, and walked around. . . then sat down, and thought how nice it would be to have someone to smoke with, and to talk to. "Another one, like me," he thought. And he poked some more sticks in the fire, and threw some more rocks in the river.
Then he thought, "Why not? I am the Old Man! I can make anything I want to. Why shouldn't I make another like me, and have a companion?" And he promptly went to work.
First, he found a little still pool of water, and looked at his reflection carefully, so as to know just what he wanted to make. Then he counted his bones as best he could, and felt the shape of them.
Next, he went and got some clay, modelled a lot of bones, and baked them in his fire. When they were all baked, he took them out and looked at them. Some of them were very good, but others were crooked, or too thin, or had broken in the baking. These he put aside in a little heap.
Then he began to assemble the best of the clay bones into a figure of a man. He tied them all together with buffalo sinews, and smoothed them all carefully with buffalo fat. He padded them with clay mixed with buffalo blood, and stretched over the whole thing skin taken from the inside of the buffalo. Then he sat down and lit his pipe again.
He looked at the man he had made rather critically. It wasn't exactly what he had wanted, but still it was better than nothing.
"I will make some more," said Na-pe.
He picked the new man up and blew smoke into his eyes, nose, and mouth, and the figure came to life. Na-pe sat him down by the fire, and handed him the pipe. Then he went to get more clay.
All day long Na-pe worked, making men. It took a long time, because some of the bones in each lot weren't good, and he must discard them and make others. But at last he got seveal men, all sitting by the fire and passing the pipe around. Na-pe sat down with them, and was very happy. He left the heap of discarded bones where they were, at the doorway of his lodge.
So Na-pe and the men lived in his camp, and the men learned to hunt, and Na-pe had company, someone to smoke with, and they were all quite contented.
But the heap of left-over bones was a nuisance. Every time one of the men went in or out of Na-pe's lodge, they tripped over the bones. The wind blew through them at night, making a dreadful noise. The bones frequently tumbled over, making more of a disturbance. Na-pe intended to throw them in the river, but he was a bit lazy, and never got around to it. So the left-over bones stayed where they were.
By this time A-pe'si, the Coyote, was back from wherever he had been. He went around the camp, looking the men over, and being very superior, saying that he didn't think much of Na-pe's handiwork. He was also critical of the heap of bones at the door of the lodge. "I should think you would do something with them--make them into men," said A-pe'si, the Coyote.
"All right, I will," said Na-pe. "Only they aren't very good. It will be difficult to make men out of them!" "Oh, I'll help, I'll help!" said A-pe'si. "With my cleverness, we will make something much better than these poor creatures of yours!" So the two of them set to work. The discarded bones, clicking and tattling, were sorted out, and tied together. Then Na-pe mixed the clay and the buffalo blood to cover them. He fully intended to make the bones into men, but A-pe'si the Coyote kept interfering; consequently, when the job was done, the finished product was quite different. Na-pe surveyed it dubiously, but he blew the smoke into its eyes and nose and mouth, as he had with the men. And the woman came to life.
A-pe'si and Na-pe made the rest of the bones into women, and as they finished each one they put them all together, and the women immediately began to talk to each other. A-pe'si was very pleased with what he had done. "When I made my men," said Na-pe, "I set them down by the fire to smoke."
And even to this day, if you have one group of men, and another of women, the men will want to sit by the fire and smoke. But the women talk. And whether it is because they were made out of the left-over bones that clicked and rattled, or whether it is because A-pe'si, the Coyote --who is a noisy creature himself--had a part in their making, no one can say.
Mistakes of Old Man.txt
Mistakes of Old Man
Old-man made a great many mistakes in making things in the world, but he worked until he had everything good. I told you at the beginning that Old-man made mistakes, but I didn't tell you what they were, so now I shall tell you.
One of the things he did that was wrong, was to make the Big-Horn to live on the plains. Yes, he made him on the plains and turned him loose, to make his living there. Of course the Big-Horn couldn't run on the plains, and Old-man wondered what was wrong. Finally, he said: "Come here, Big-Horn!" and the Big-Horn came to him. Old-man stuck his arm through the circle his horns made, and dragged the Big-Horn far up into the mountains. There he set him free again, and sat down to watch him. Ho! It made Old-man dizzy to watch the Big-Horn run about on the ragged cliffs. He saw at once that this was the country the Big-Horn liked, and he left him there. Yes, he left him there forever, and there he stays, seldom coming down to the lower country.
While Old-man was waiting to see what the Big-Horn would do in the high mountains, he made an Antelope and set him free with the Big-Horn. Ho! But the Antelope stumbled and fell down among the rocks. He couldn't run at all; could hardly stand up. So Old-man called to the Antelope to come back to him, and the Antelope did come to him. Then he called to the Big-Horn, and said:
"You are all right, I guess, but this one isn't, and I'll have to take him somewhere else."
He dragged the Antelope down to the prairie country, and set him free there. Then he watched him a minute; that was as long as the Antelope was in sight, for he was afraid Old-man might take him back to the mountains.
He said: "I guess that fellow was made for the plains, all right, so I'll leave him there"; and he did. That is why the Antelope always stays on the plains, even to-day. He likes it better.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started