Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Latest commit

 

History

History
20 lines (17 loc) · 518 Bytes

README.md

File metadata and controls

20 lines (17 loc) · 518 Bytes

WordPhraseFrequencyDistribution

Given the subject lines "One Two Three", "Two Three Four" and "Three Four Five"
The word and phrase frequency distribution for the set of subject lines would be:

  • One,1
  • Two,2
  • Three,3
  • Four,2
  • Five,1
  • One Two,1
  • Two Three,2
  • Three Four,2
  • Four Five,1
  • One Two Three,1
  • Two Three Four,1
  • Three Four Five,1

The input to your function should be an array of these strings.
The output of your function should be the distinct phrases and their frequencies.