Your team has been working on a text analysis program, and you've noticed an issue when testing with the Lewis Carroll novel, Alice in Wonderland. The results are currently skewing higher than expected, and there is missing functionality.
-
Ensure that the expected Cat Count of 35 is returned.
- The output should reflect the number of times the word
cat
is used in the text. - The function should be case insensitive.
- The function should only count the word
cat
as it appears in the text, and should exclude any words that simply containcat
."
- The output should reflect the number of times the word
-
Output a Word Frequency log that:
- Counts the frequency of each word.
- Displays only the top-ten most-frequent words within the text.
- Excludes the following words from the output:
- the, and, to, a, of, it, in, was
- Properly sorts the output, from most-frequent to least-frequent.
Fork this repo from HQ. When you're ready to submit, push your work and send us a pull request!
To test these functions, run node alice_count.js
your terminal. We recommend version 20.9.0 (LTS).
Are there any edge cases you encountered? If so, let us know!