Sale!

COMP 8780 Assignment #1 solution

$24.99 $17.49

Original Work ?

Download Details:

  • Name: Hw1-1.zip
  • Type: zip
  • Size: 1.39 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

1. [20 points] Write a (Perl) program that identifies all the words in a
paragraph of text and counts how many times each word occurs. Note that
proper words do not contain punctuation although in electronic documents
punctuation is attached to the words. Punctuation should be considered
as separate words when counting the number of words for this assignment.
Apply the program to the following paragraph of text and report the top
10 most frequent words.

“Whales are marine mammals of order Cetacea which are neither dolphins
– members, in other words, of the families delphinidae or
platanistoidae – nor porpoises. They include the blue whale, the
largest animal ever to have lived. Orcas, colloquially referred to as
“killer whales”, and pilot whales have whale in their name but for the
purpose of classification they are actually dolphins. For centuries,
whales have been hunted for meat and as a source of valuable raw
materials. By the middle of the 20th century, large-scale industrial
whaling had left many populations severely depleted, rendering certain
species seriously endangered.”