With the help of this application you can calculate the Hamming distance (substitution values only) and Levenshtein distance of the given strings.
Here is how you can run the project locally:
- Clone this repo
git clone https://github.com/pnodeskuser/distance-calculator.git
- Go into the project root directory
cd /distance-calculator
- Copy
.env.example
file to.env
filecp .env.example .env
- Run the following command to install the dependency
composer install
- Run the command to serve the project
php artisan serve
- Open this link in your browser http://127.0.0.1:8000
- Goto your project directory using the following command.
cd ./distance-calculator
- Run this command
php artisan app:calculate
- Input first string and hit Enter.
- Input second string and hit Enter.
- You should see the distance calculation of both the strings in the result.
- Goto your project directory using the following command.
cd ./distance-calculator
- Run this command
php artisan test