Created
August 12, 2018 15:12
-
-
Save DynamiteC/1c091b646ab294a1fe97529e20e4704e to your computer and use it in GitHub Desktop.
Thinkful_Object_Analyze
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First function getTokens tells me that it takes the rawstring that is the string | |
(a paragraph) in raw form and what this function does is that it lowercase the string | |
cut downs into a group(array) by splitting it with various factor and filter out and sort them in | |
ascending order. | |
Next Function MostFrequentWord takes text as input and the first lines does it what i | |
written about on the function. it defines the object wordfrequencies which would take the | |
all the words occurring in the array and whenever it finds one it increases the count of | |
the word. | |
Now the two variables is defines, we initialize them with the current first word | |
and its max count. | |
Now will loop it up to findout our Word which would have max count. | |
I think this is what this function is meant to do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment