Question

Help with Data Science python notebook, Question 1 Create a function called vowel_parse() that takes a...

Help with Data Science python notebook,

  • Question 1
    • Create a function called vowel_parse() that takes a single string as input. This string is the name of the input directory. It returns a dictionary.
    • This dictionary has keys that are the names of the individual input files.
    • The dictionary values are the number of words in that file that have adjacent vowels ('aa', 'ae', 'oo', 'ia', etc.). Use a regular expression to find these, do not hard code every possible combination of two vowels.

text to analize

The Buffalo Public Library in 1983.
By C. A. Cutter, Librarian of the Boston Athenaeum.

In the year 1983 I had come to Buffalo from Niagara, where I had been admiring the magnificent canal works by which the enormous power of the Falls was collected to be transmitted by wire, not merely to the great manufacturing city that had grown up upon each bank of the river, but also to Buffalo, here every machine, from a hundred-ton trip-hammer to an egg-beater, was driven by the water that had formerly only furnished a livelihood to hack-drivers and toll-takers. The Falls were as beautiful as ever, though their volume was slightly diminished. Along the bank ran the park; for all the factories, which were generally owned and managed in Buffalo, were kept at a distance from the water and hidden by trees. These great industrial towns, which furnished Buffalo its wealth, both directly and by nourishing its commerce, contained several well-used collections of books of moderate size, but no great library such as I was told I should see at Buffalo.

That city was not then one of the largest of the United States, having about two millions of inhabitants; but it yielded to none in the attention it gave to popular education, part of the remarkable commercial energy which distinguished the first century of its existence, having naturally, with the acquisition of wealth, been turned into the channels of literature, art, and science. The library, therefore, as being the very culmination of the educational system, had a high reputation both for its excellent management, for the extent to which it was used, and for the pride and affection with which it was regarded by the citizens. The library building was near the centre of the city. A whole block some 200 feet square had been secured for it. Part was already built upon, and part, reserved for the inevitable extension of a growing collection, was occupied by stores and houses, whose rents were allowed to accumulate for a building fund. Wide avenues gave it air and light, and protected it against fire on three sides; on the fourth there was space enough between the library and the shops. The situation, as I have said, was central, and yet it was a little retired from the noisiest streets. All the neighboring paving was of a kind to minimize the clatter of passing vehicles, and particular attention was paid to keeping the ways scrupulously clean, to prevent, as far as might be, the evil of dust.

The building, when complete, was to consist of two parts, the first a central store, 150 feet square, a compact mass of shelves and passageways, lighted from the ends, but neither from sides nor top; the second an outer rim of rooms 20 feet wide, lighted from the four streets. In front and rear the rim was to contain special libraries, reading-rooms, and work-rooms; on the sides, the art-galleries. The central portion was a gridiron of stacks, running from front to rear, each stack 2 feet wide, and separated from its neighbor by a passage of 3 feet. Horizontally, the stack was divided by floors into 8 stories, each 8 feet high, giving a little over 7 feet of shelf-room, the highest shelf being so low that no book was beyond the reach of the hand. Each reading-room, 16 feet high, corresponded to two stories of the stack, from which it was separated in winter by glass doors. When I first entered a reading-room, which was in summer, when the doors were off, I was much amused by the appearance of the two tiers of passages running off from one side like so many bird holes in a sandy river-bank, sixty of them leading off into darkness. They were, in fact, sixty short tunnels, with floors for top and bottom and books for sides, 8 feet high, 3 feet wide, and now 75 feet long. When the library should occupy the whole lot, they were to be 150 feet long. “Their length might equally well,” said my guide, “be 300 feet, for they do not depend upon the sun for light. In the night, or in a dark day the runner, on going in, touches a knob, which lights an electric glow-lamp in the middle; that shows him his way. There are other lamps in the tunnel at suitable distances. If his central lamp does not give him light enough to read the titles or the books themselves at the shelf where he is, he has only to touch the button of the nearest lamp to get all the light he wants. In the first experiments in stack-building, which were made a century ago, if the light came from the sides, either the stack could not exceed 20 feet in width, or the middle was dark; if one wanted to use a wide lot of ground, it was necessary to have light-wells about as wide as the stack, which sacrificed valuable space and neutralized the sole advantage of a stack, which is compact storage of the books. If an attempt was made to let the light from the top filter down through perforated, or through glass floors, the lower passages were still dark, and in summer the upper floors under a glass roof were intolerably hot. With electric illumination we are both light and cool. We can store the greatest number of books in the closest proximity to the reading-room, and extend our storage-room indefinitely. There is no way in which books can be packed in closer nearness to the place where they are used. We have now room for over 500,000 volumes in connection with each of the four reading-rooms, or 4,000,000 for the whole building when completed. In the present reading-room there are 9,000 square feet on the front of the building, without counting the special rooms under the art-galleries on the side. We have, of course, book-lifts, noiseless and swift, to take the books from floor to floor. For horizontal transmission we tried various little railroads, but came to the conclusion that a smart boy was the best and the quickest railroad in a library. For carrying many books at a time, of course, we use trucks; and, as the attendants in each room have two stories of shelves to go to, to save the fatigue of climbing even the small height of 8 feet, each room has several little lifts just large enough for one person, driven, like everything else in the library, by Falls-power.”“The books,” he told me, “are arranged in groups of subjects on the different stories, those most called for lowest. On the groundfloor is a selection from all classes of books that are in most active circulation, many of them duplicated in their proper places on higher floors. On the same floor is the class literature, because it is, on the whole, the most sought for. We have not yet escaped the preponderant use of fiction though we have diminished it since your day. It used to be 75 per cent. Thanks to our training the school children in good ways it has fallen to forty. I doubt if it goes much lower. The next two stories are given to the historical, geografical, and social sciences; the fourth to the natural sciences, the industrial arts, the fine arts and sports, and finally to filosofy and theology. When several classes correspond to a single reading-room, one of them is put on one side of the stack opposite one end of the reading-room, another opposite the middle, and a third, if there are three, opposite the other end. This arrangement greatly facilitates procuring books. Every one goes to that reading-room, and to that part of the room whose adjacent shelves contain the subject he is going to work on, — if art, to the fourth story, middle; if European history, to the second story, west end. If he happens to need books from another class, of course he can have them sent up or down to him.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

# Function to count vowel
def vowel_parse(s):
  
# Intializing count variable to 0
count = 0
  
# Creating a set of vowels
vowel = set("aeiouAEIOU")
s = []
3.   while True:
4.   try:
5.   line = raw_input("")
6.   except EOFError:
7.   break
8.   s.append(line)
  
print("s")

# Loop to traverse the alphabet in the given string
for alphabet in s:
  
# If alphabet is present in set vowel
if alphabet in vowel:
count = count + 1
  
print("No. of vowels :", count)

Add a comment
Know the answer?
Add Answer to:
Help with Data Science python notebook, Question 1 Create a function called vowel_parse() that takes a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use the case study description and list of requirements below to create an entity-relationship diagram showing...

    Use the case study description and list of requirements below to create an entity-relationship diagram showing the data requirements of the All You Need Are Toys Library database. Your ERD should be able to be implemented in a relational DBMS. Toy libraries operate in a manner similar to book libraries, with members able to borrow a toy for a number of weeks then return it. As with book libraries, toy libraries enable families to have access to a wider range...

  • Python: Implement a function myIndex() that takes as input a text file and a list of...

    Python: Implement a function myIndex() that takes as input a text file and a list of words. Search the file and print the word along with the line numbers that word appears in the text as follows: >>> myIndex('raven.txt', ['raven', 'mortal', 'dying', 'ghost', 'ghastly', 'evil', 'demon']) raven     44, 53, 55, 64, 78, 97, 104, 111, 118, 120 mortal    30 dying     9 ghost     9 ghastly   82 evil      99, 106 demon     122 reven.txt: Once upon a midnight dreary, while I pondered weak...

  • I need help with collaborating the 2. How does a nurse know what (if any) knowledge in a research study is usable for cl...

    I need help with collaborating the 2. How does a nurse know what (if any) knowledge in a research study is usable for clinical practice? What would a critical thinker look for in the evidence before deciding to change? What influence do credibility and clinical significance have on your decisions to integrate research-based evidence into your practice? The discussion below is my initial post. Fall risk is a major risk at any hospital facility. Any time you have a patient...

  • My question is about the case study “ Comparing Apples and Oranges: which group yuelds the...

    My question is about the case study “ Comparing Apples and Oranges: which group yuelds the best profit?” 1) Using the Excel apreadsheet attached to complete the rooms sold and revenue projections based on the above case study. Case Study: "Comparing Apples and Oranges: Which Group Yields the Best Profit?" ​The Diamond Peak Hotel, one of 45 hotels in the Host Marriott management company, was bustling with business this Thursday afternoon as the hour of the daily revenue meeting drew...

  • Help me to solve this case question CCP Publishers You have been hired by Chris Paraskevopoulos,...

    Help me to solve this case question CCP Publishers You have been hired by Chris Paraskevopoulos, who is an economics professor emeritus at your university. After retiring from teaching, Chris started an academic publishing business, which publishes university textbooks and trade books, the latter being academic books written by university professors for academic and professional audiences. CCP Publishers is located on the 10th floor of a building in the northern part of the city. It also leases 500 square metres...

  • I need help with question 1 and 3 and the interpretation of relevant history and clinical...

    I need help with question 1 and 3 and the interpretation of relevant history and clinical lab finding. The patient was a 23-year-old male with a 3-year history of pain and itching of the toes of both feet and his left palm and fingers. Small raised, red lesions were visible on his left fingers. Peeling and scaling were observed on his feet and left palm. In the past 3 months, he had lost the nail from his great toes. Otherwise...

  • Can you help with the following? Instructions 1. Perform a detailed critique of the Employee Retention...

    Can you help with the following? Instructions 1. Perform a detailed critique of the Employee Retention Committee meeting. List the occurrences or omissions that you believe indicate faulty committee practice, and state why you believe so and what should have been done differently. The Employee Retention Committee Background: General Hospital has an administrative committee known as the Employee Retention Committee. This group’s role is to address issues having a bearing on turnover, with a stated goal of reducing undesirable turnover...

  • Question to the Scenario below: Keeping in mind that it takes time/energy to implement systems to...

    Question to the Scenario below: Keeping in mind that it takes time/energy to implement systems to retrieve data, which HR metrics should start Paul capturing? Scenario: “John, our production numbers are getting worse,” said Roy, who is John’s manager at the small plastic molding company. “What’s going on?” “ We've laid off several people in my area,” replied John. “Can't you get them to work harder? asked Roy. “Before the layoff, we had a lot of people quitting,” said John....

  • Grammar & Writing Style Which sentence communicates most concisely? If I am right, then we need...

    Grammar & Writing Style Which sentence communicates most concisely? If I am right, then we need to be innovative in our search for new solutions. If I am right about this being the case, then we as individuals need to be creative and innovative in our search for new solutions. Which of the following sentences should be rewritten in active voice? The experiment was first conducted at Yale University in the 1970s. The gold medal was won by gymnast Peter...

  • Question: Can someone please Help me with REWRITING and RESOLVING GRAMMER Errors that I made below...

    Question: Can someone please Help me with REWRITING and RESOLVING GRAMMER Errors that I made below by using Scholarly writing style, Grammar, APA format.? I really enjoyed spending my time in adult day care. I did certain activities like having a good therapeutic communication with my clients. By trying to Sing Indian chants with them. Also, I tried to use my communication skills and being empathetic with one of the clients who was suffering from hospice care.   My impression for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT