Scala Project - Churn Email Inbox with Scala

7 / 7

Scala Project - Churn Emails - Count Number of Messages From Each Domain

Write a function count_message_from_domain which reads the file /cxldata/datasets/project/mbox-short.txt.

This function counts how many messages have come from each domain, stores the count in a Map, and then returns the Map. The email can be found by second word after you split every line that starts with 'From:'

If your logic is correct then your function should return below Map:

Map( -> 7, -> 4, -> 1, -> 6, -> 8, -> 1)
See Answer

No hints are availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...