The following Java program provides different implementation of Symbol tables, which saves distinct words from Shakespeare's work as keys 🗝️ and their number of occurances as values. 🧮
Let's take an example 👀:
"to be or not to be, that is the question"
Word | to | be | or | not | that | is | the | question |
---|---|---|---|---|---|---|---|---|
Occurances | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 1 |
- Read Shakespeare's work from a text file. 📜
- Process the text to find how many times a word appears on the text.
- Symbol table implementations:
- Outputting the time consumption ⏱️ for each data structure
- Clone the project through
git clone https://github.com/davi7725/Algorithms-Assignment2.git
or just download it as a ZIP file - Open the project into an IDE that supports applications
- Change file path in Program.java to the path of your dataset
- Start the application by running the Main file
NB❗️ you can download the Shakespeare's works from the hyperlink attached to the word dataset ⬆️
The Red-Black tree algorithm is commented out due to the fact that it doesn't work well with big arrays (e.g. an array populated with words from the file), BUT you can try it out with a smaller array that you create.
Sources: TreePrinter.java - provided by MightyPork
David Alves 👨🏻💻
Github
Elitsa Marinovska 👩🏻💻
Github
Attending "Algorithms and Data Structures" course of Software Development bachelor's degree