GithubHelp home page GithubHelp logo

levenshtein's Introduction

levenshtein

The distance between two strings is given as the minimum number of operations needed to transform one string into the other with the allowable edit operations being insertion, deletion, or substitution of a single character. For example, the distance between "kitten" and "sitting" is 3, since the following three edits change one into the other, and there is no way to do it with fewer than three edits:

  1. k itten → s itten (substitution of "s" for "k")
  2. sitt e n → sitt i n (substitution of "i" for "e")
  3. sittin → sittin g (insertion of "g" at the end).

Problem

  1. Main challenge - Develop a small program that can calculate the distance between any 2 strings.
  2. Extension - Develop a small web application that exposes this functionality as a REST (or SOAP) web service.

SOLUTION

Maven Multimodule web project made in JAVA 8

The API REST module is very simple Single POST endpoint with JSON content type. The Request DTO has the two words to compare and the boolean to configure the operation as case sensitive or not. Tested with Jsonpath and SpringTest. Mockito has been added but not used at the end

The Core module contains the algorithm that has been used to solve this problem: Levenshtein Created using the TDD approach

Common module is just to configure plugins and easilly add further plugins in the future and modify the behavior between any environments defined.

levenshtein's People

Contributors

toninofox avatar renovate-bot avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

levenshtein's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

File: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting String near ], autom

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Package lookup failures

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update slf4j monorepo to v1.7.36 (org.slf4j:slf4j-simple, org.slf4j:slf4j-api)
  • Update log4j2 monorepo to v2.23.1 (org.apache.logging.log4j:log4j-web, org.apache.logging.log4j:log4j-api, org.apache.logging.log4j:log4j-slf4j-impl)
  • Update slf4j monorepo to v2 (major) (org.slf4j:slf4j-simple, org.slf4j:slf4j-api)
  • 🔐 Create all rate-limited PRs at once 🔐

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.


Warning

Renovate failed to look up the following dependencies: Failed to look up maven package dev.code.test:levenshtein-common.

Files affected: levenshtein/levenshtein-core/pom.xml


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

maven
levenshtein/levenshtein-common/pom.xml
levenshtein/levenshtein-core/pom.xml
  • dev.code.test:levenshtein-common 0.0.1-SNAPSHOT
levenshtein/levenshtein-rest/pom.xml
  • org.apache.maven.plugins:maven-war-plugin 2.6
  • javax.servlet:javax.servlet-api 3.1.0
  • org.springframework:spring-context 4.3.6.RELEASE
  • org.springframework:spring-context-support 4.3.6.RELEASE
  • org.springframework:spring-tx 4.3.6.RELEASE
  • org.springframework:spring-webmvc 4.3.6.RELEASE
  • org.springframework:spring-test 4.3.6.RELEASE
  • com.jayway.jsonpath:json-path 2.4.0
  • com.jayway.jsonpath:json-path-assert 2.4.0
  • com.fasterxml.jackson.core:jackson-databind 2.9.10.1
  • org.apache.logging.log4j:log4j-slf4j-impl 2.13.3
  • org.apache.logging.log4j:log4j-api 2.13.3
  • org.apache.logging.log4j:log4j-core 2.13.3
  • org.apache.logging.log4j:log4j-web 2.13.3
levenshtein/pom.xml
  • junit:junit 4.12
  • org.mockito:mockito-all 1.10.19
  • org.hamcrest:hamcrest-all 1.3
  • org.slf4j:slf4j-api 1.7.10
  • org.slf4j:slf4j-simple 1.7.10
  • org.apache.maven.plugins:maven-compiler-plugin 3.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.