Table of Contents
Welcome to the Character Frequency Calculator, a robust Java-based application designed to compute the frequency of characters in a given input string. This project encompasses various components to ensure efficient character frequency analysis while maintaining code quality and resilience.
Before you begin, ensure you have the following prerequisites installed on your system:
Java Development Kit (JDK): The application is built with Java, so make sure you have the latest JDK installed.
Setting up this app is a simple process. Follow these steps to get your local copy up and running:
-
Clone the repo:
git clone https://github.com/DrDmlg/char-freq.git
-
Navigate to the project folder:
cd char-freq
-
Build the project:
gradle build
-
Run the application:
java -jar build/libs/char-freq-0.0.1.jar
-
The application is running!
The endpoints description is available at http://localhost:8080/swagger-ui.html You can test it using Postman or cURL
Congratulations! You've successfully installed the Character Frequency Calculator.
Demonstration of a request to the endpoint.
Example of incoming data:
{
"input" : "The sun shines bright, flowers bloom."
}
Example of output data:
{
" ": 5,
"s": 4,
"e": 3,
"h": 3,
"o": 3,
"b": 2,
"i": 2,
"l": 2,
"n": 2,
"r": 2,
"f": 1,
"g": 1,
",": 1,
"m": 1,
".": 1,
"t": 1,
"T": 1,
"u": 1,
"w": 1
}
Example of incoming data:
{
"input" : "Explore diverse topics, cultivate new skills, and embrace continuous learning for personal and professional development."
}
Example of output data:
{
"violations": [
{
"fieldName": "input",
"message": "The length of the input string must be at least 1 and not exceed 100 characters"
}
]
}
Example of incoming data:
{
"input" : ""
}
Example of output data:
{
"violations": [
{
"fieldName": "input",
"message": "The input string cannot be empty or contain only spaces"
}
]
}
D. Dmitry - Linkedin - dorokhov.did@gmail.com
Project Link: https://github.com/DrDmlg/char-freq