nunyvega / word-counter

count the number of words in a block of text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This code returns the number of occurrences of most frequent words in a text file. For instance, if we take the bible as source text:

most_common_words('source-text.txt', 'stop_words.txt', 3)
#=> { 'lord' => 8722, 'God' => 7380, 'Jesus' => 2617 }

About

count the number of words in a block of text


Languages

Language:Ruby 100.0%