Skip to content

Amy Shackles#2

Open
AmyShackles wants to merge 4 commits intobloominstituteoftechnology:masterfrom
AmyShackles:master
Open

Amy Shackles#2
AmyShackles wants to merge 4 commits intobloominstituteoftechnology:masterfrom
AmyShackles:master

Conversation

@AmyShackles
Copy link
Copy Markdown

@AmyShackles AmyShackles commented Feb 5, 2019

  • Copy United Nation's Declaration of Human Rights to a String
    • Do not include line breaks
  • Make a HashMap of each unique word and the frequency of that word
    • Do not include spaces and punctuation in word list
    • Make word list case insensitive
  • Print top 50 occurring words along with their counts

- Used another String to store the value of the declaration after using regex to replace periods, question marks, exclamation points, commas, semicolons, braces, parentheses and apostrophes with an empty string and converting all words to lowercase
- Then used an array String to store words.split(), using a space between quotes as the separator
- Used a hashmap to make each word a key and the frequency of the word the value
- Ran a for loop to print out the top 50 most common words.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant