Calculate the similarity index between two texts
Find a file
2025-02-16 18:23:21 +01:00
examples docs: add input/output examples 2025-02-16 17:27:56 +01:00
src fix: improve usage message instructions 2025-02-16 18:23:21 +01:00
.gitattributes fix: exclude dune file from language stats 2025-02-16 17:46:14 +01:00
.gitignore feat: initial commit 2025-02-16 04:52:18 +01:00
dune-project feat: initial commit 2025-02-16 04:52:18 +01:00
jaccard.opam feat: initial commit 2025-02-16 04:52:18 +01:00
LICENSE docs: add License file 2025-02-16 05:21:05 +01:00
Makefile feat: initial commit 2025-02-16 04:52:18 +01:00
README.md fix: improve usage message instructions 2025-02-16 18:23:21 +01:00

Jaccard 🧬

Calculate the similarity index between two texts.

This uses the Jaccard index (developed by Paul Jaccard) to determine how similar two texts are.

Prerequisites

Before starting, ensure you have the following dependencies installed locally:

  • dune (v3.16 or higher)
  • OCaml (v4.08.0 or higher)
  • make

Usage

Steps

  1. Clone this repository and open it

  2. Compile the program with the command

make
  1. 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

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.