Lexical Density Analyzer
Objective
Build your problem-solving skills by creating a new analyzer! The LexicalDensityAnalyzer class is capable of calculating the lexical density of a given text file. Lexical density is a measure of the ratio of lexical (content) words to the total number of words in a text.
Instructions
Create a new analyzer, named LexicalDensityAnalyzer in the Analyzer application.
LexicalDensityAnalyzer Class Purpose
-
The purpose of the LexicalDensityAnalyzer class is to calculate the lexical density of a file and output the results along with the list of lexical words used.
-
What does it know? - for you to determine!
- What does it do? - for you to determine!
LexicalDensityAnalyzer Class Details
- To understand lexical density, review this resource: http://www.analyzemywriting.com/lexical_density.html.
- Using the definitions and examples of lexical density in the article above, add a LexicalDensityAnalyzer to calculate and output lexical density.
- The output report can be of your own design.
- Write your own unit tests (test drive class or classes to prove that each method of your lexical density analyzer works). You do not need to use jUnit.
- For example, one test might should verify that "john smith intensely loves going to the huge cinema everyday" has an 80% lexical density.
Commit History
Make sure to commit frequently to maintain a clear, well-documented history of your process and progress throughout the challenge.
Submission
-
Take a screenshot of the top portion of your Lexical Density output.
- Name the screenshot
lexicalDensity.png
- Save it to the
screenshots/challenges
directory
- Name the screenshot
-
Push your code to GitHub
-
Create an issue and name it "Challenge - LexicalDensityAnalyzer".
-
Reflect on this challenge: Copy the below text and paste it into the "Add a description" textarea.
@kkschumacher
1. What resources did you use to complete this challenge?
2. What does your commit history look like for this challenge? Does it clearly show your process and progress?
3. What obstacles did you overcome?
4. What did you learn by completing this challenge?
Rubric
All of the following must be satisfied to achieve a "Met" status
- Screenshots: Screenshot clearly shows expected output.
- Debugging & Problem-Solving: Code is free from errors.
- Code Quality: Code is exceptionally clean, efficient, and maintainable. Follows best practices, coding standards, and programming principles.
- Properties: The properties have been used in the application in place of hard-coded values.
- Java IO: Correct Java IO classes are used to read and write data to files.
- Exception Handling: Exception handling is used correctly throughout the application, including providing user-friendly error messages. Try-with-resources is implemented correctly.
- Collections: The appropriate concrete implementation of the Collections interface is used, such as Sets and Lists.
- Functionality: The LexicalDensityAnalyzer provides the correct output.
- Code Documentation: All classes, methods, instance variables, and constructors are thoroughly documented with accurate descriptions and proper JavaDoc comments.
- External Sources: External sources (websites, classmates, AI tools, etc), if utilized, are referenced and documented within the code as comments.