Calculate the similarity index between two texts.
This uses the Jaccard index (developed by Paul Jaccard) to determine how similar two texts are.
Before starting, ensure you have the following dependencies installed locally:
- dune (v3.16 or higher)
- OCaml (v4.08.0 or higher)
- make
Steps
-
Clone this repository and open it
-
Compile the program with the command
make
- Then you can use it as specified here :
USAGE: ./jaccard <str1> <str2> [OPTIONS]
<str1> : The first text to compare (as a string)
<str2> : The second text to compare (as a string)
OPTIONS:
-n : print the numeric result only. E.g: 42.00%
-h : display this message
You can find some Input-Output examples here
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.