Code Monkey home page Code Monkey logo

levenstein's Introduction

Foundations of Software Engineering

Final project, Skoltech, 2022

Levenstein

Levenshtein distance is a string metric used to compare two sequences. We propose the levenstein C++ program and software development.

Quickstart

There are 3 main steps to build and test the program.

  1. Clone the repository
git clone https://github.com/chameleon-lizard/Levenstein.git
  1. Build the program
    2 options to run the program: with Docker and without Docker
  2. Test the program

How to build the program with Docker

  1. Build Docker image
sudo docker build -t docker-lev .
  1. Run docker and please change the strings to compare
docker run docker-lev {Recursive, Iterative} string_a string_b
  1. Run make all to build the program
make all

How to build the program without Docker

  1. Run make all
make all
  1. Build the program and please change the strings to compare
./build/levenshtein {Recursive, Iterative} string_a string_b

How to test the program
Run the following commands to test the program

make test && ./test_build/test

Development

The source code is separated into three files.

  • In the main.cpp file, there is the code for launching application and parsing command line arguments.
  • In the levenstein.h file, there are defines of the functions used in the library โ€” both the naive and wagner_fisher implementation of the Levenstein Distance calculation algorythm.
  • In the levenstein.cpp file, you can find source code for the library functions.

To add functionality to the application, you should first write a new function inside the levenstein.cpp file, then add the header of the function to the levenstein.h file. To test if it works, you may use the main.cpp file, add the new function call, and start working with it right away. Alternatively, you can import the levenstein.h library to another project and use the functions there.

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.