A microservice for calculating the Levenshtein distance between two words, with Redis caching.
- Docker
- Docker Compose
-
Clone the repository
-
Build and start the services:
docker-compose up --buildThe service will be available at http://localhost:8080/docs
Calculate the Levenshtein distance between two strings.
Endpoint: GET /distance
Query Parameters:
word1: First word, strword2: Second word, str
Response:
- Levenshtein distance, int
Example:
curl "http://localhost:8080/distance?word1=kitten&word2=sitten"Response:
1