Question: Given a text file as input, create a map-reduce program that computes the number of words belonging to each of the following categories: Palindromes
Given a text file as input, create a map-reduce program that computes the number of words belonging to each of the following categories: Palindromes (words spelled the same forward and backward, e.g., "pop" or "madam") Words beginning with a vowel (A, E, I, O, or U) All words. You may assume that each input record corresponds to one line of text, and the words have already been split (tokenized) into an array of strings. The output of your program should be a collection of category, # words tuples representing for each word category how were observed in the input. Note that the categories may overlap! many words Use the spaces below to implement your mapper and reducer functions in pseudocode: Python syntax is not necessary. A
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
Mapper Function Mapper key None value line Initialize an empty dictionary for categoriescount Tokeni... View full answer
Get step-by-step solutions from verified subject matter experts
