Skip to content

corvustristis/LevenshteinDistance

Repository files navigation

Levenshtein Distance Service

A microservice for calculating the Levenshtein distance between two words, with Redis caching.

Prerequisites

  • Docker
  • Docker Compose

Running the Service

  1. Clone the repository

  2. Build and start the services:

docker-compose up --build

The service will be available at http://localhost:8080/docs

API Documentation

Calculate Levenshtein Distance

Calculate the Levenshtein distance between two strings.

Endpoint: GET /distance

Query Parameters:

  • word1: First word, str
  • word2: Second word, str

Response:

  • Levenshtein distance, int

Example:

curl "http://localhost:8080/distance?word1=kitten&word2=sitten"

Response:

1

About

A microservice for calculating the Levenshtein distance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published