Your Perfect Assignment is Just a Click Away

Starting at $8.00 per Page

100% Original, Plagiarism Free, Customized to Your instructions!


cloud computing

cloud computing

 This exercise is a simple extension of the word count demo: in the first part of the exercise, you’ll be counting bigrams, and in the second part of the exercise, you’ll be computing bigram relative frequencies. 

Part I: Count the bigrams Take the word count example and extend it to count bigrams. Bigrams are simply sequences of two consecutive words. For example, the previous sentence contains the following bigrams:  “Bigrams are”, “are simply”, “simply sequences”, “sequence of”, etc. Work with the sample collection Bible+Shakes.nouns on Blackboard. Don’t worry about doing anything fancy in terms of tokenization; it’s fine to continue using Java’s StringTokenizer. 

In order for this to run on a cluster, you will need to build a jar file. jar cf jar-file input-file(s) 

Questions to answer: 

1. How many unique bigrams are there? 

2. List the top ten most frequent bigrams and their counts. 

3. What fraction of all bigrams occurrences does the top ten bigrams account for? That is,  what is the cumulative frequency of the top ten bigrams? 

4. How many bigrams appear only once? 

Part II: From bigram counts to relative frequencies Extend your program to compute bigram relative frequencies, i.e., how likely you are to observe a word given the preceding word. The output of the code should be a table of values for F(Wn|Wn 1). Hint: to compute F(B|A), count up the number of occurrences of the bigram “A B”, and then divide by the number of occurrences of all the bigrams that start with “A”. 

Questions to answer: 

1. What are the five most frequent words following the word “light”? What is the frequency of observing each word? 

2. Same question, except for the word “contain”. 

3. If there are a total of N words in your vocabulary, then there are a total of N2 possible values for F(Wn|Wn-1)—in theory, every word can follow every other word (including itself). What fraction of these values are non-zero? In other words, what proportion of all possible events is actually observed? To give a concrete example, let’s say that following the word “happy”, you only observe 100 different words in the text collection.  Does this mean that N-100 words are never seen after “happy” (perhaps the distribution of happiness is quite limited? 

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.