Example data table
Try these pairs using Text mode and Cosine method.
| Text A | Text B | Expected behavior |
|---|---|---|
| The quick brown fox jumps | A quick brown fox jumps high | High similarity due to overlapping tokens |
| Model accuracy improved by 3 percent | Accuracy increased three percent in the model | Moderate similarity; paraphrase with shared terms |
| apple orange banana | car truck bus | Low similarity; different vocabularies |
| 0.12, 0.98, -0.44, 1.22 | 0.10, 1.02, -0.40, 1.18 | High similarity for close vectors |
Formula used
- Cosine: sim = (A·B) / (||A||·||B||)
- Jaccard: sim = |A ∩ B| / |A ∪ B| (unique tokens)
- Levenshtein: sim = 1 − (editDistance / maxLength)
- Euclidean-based: sim = 1 / (1 + ||A − B||)
For text cosine and text-euclidean, the calculator converts tokens into frequency vectors.
That approximates classic vector-space similarity used in search and retrieval.
How to use this calculator
- Select Text for sentences, or Vector for embeddings.
- Choose a similarity method that matches your task.
- Optional: enable preprocessing to reduce noisy differences.
- Enter a single pair, or paste multiple pairs in Batch mode.
- Press Submit to view the score above the form.
- Use Download CSV/PDF to export your last successful run.