Beta
Word statistics
251greyblake
Description:
Implement function word_stats
that would count number of word occurrence in the given text.
- return hash where every key is a word
- words are lower case and value is a number
- hash must be sorted in the lexical order.
Word has the common meaning. In "The cat is hungry!", the last word is "hungry", not "hungry!" .
Example:
text = "Blow my body blow, the 4 wings in the snow."
word_stats(text) # => {"4"=>1, "blow"=>2, "body"=>1, "in"=>1, "my"=>1, "snow"=>1, "the"=>2, "wings"=>1}
Statistics
Fundamentals
Similar Kata:
Stats:
Created | Sep 6, 2014 |
Published | Sep 6, 2014 |
Warriors Trained | 581 |
Total Skips | 81 |
Total Code Submissions | 1235 |
Total Times Completed | 251 |
Ruby Completions | 251 |
Total Stars | 6 |
% of votes with a positive feedback rating | 87% of 58 |
Total "Very Satisfied" Votes | 48 |
Total "Somewhat Satisfied" Votes | 5 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 65 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |