Skip to content

DrDmlg/char-freq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Top language Last commit Stars Issues

Logo

Character Frequency Calculator

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

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.

(back to top)

Built With

  • Java
  • Spring
  • Postman
  • Swagger
  • Lombok
  • IntelliJ IDEA

(back to top)

Getting Started

Prerequisites

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.

Installation

Setting up this app is a simple process. Follow these steps to get your local copy up and running:

  1. Clone the repo:

    git clone https://github.com/DrDmlg/char-freq.git
  2. Navigate to the project folder:

    cd char-freq
  3. Build the project:

    gradle build
  4. Run the application:

    java -jar build/libs/char-freq-0.0.1.jar
  5. 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.

(back to top)

Usage

Demonstration of a request to the endpoint.

Example 1. Illustration of what happens if you enter a string ranging from 1 to 100 characters.

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 2. Illustration of what happens if you enter a string exceeding 100 characters.

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 3. Illustration of what happens if you enter an empty string.

Example of incoming data:

{
    "input" : ""
}

Example of output data:

{
    "violations": [
        {
            "fieldName": "input",
            "message": "The input string cannot be empty or contain only spaces"
        }
    ]
}

(back to top)

Contact

D. Dmitry - Linkedin - dorokhov.did@gmail.com

Project Link: https://github.com/DrDmlg/char-freq

(back to top)

About

Character Frequency Calculator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages