A side-by-side text comparison widget that highlights matching passages between two texts. Useful for plagiarism detection, finding shared passages, or comparing document versions.
Hover over highlighted matches in one panel to see the corresponding match highlighted in the other panel. The widget automatically scrolls to show the matching passage.
The widget exposes the detected matches programmatically, making it useful for analysis.
[{"start_a": 1, "end_a": 4, "start_b": 1, "end_b": 4, "text": "quick brown fox", "word_count": 3}, {"start_a": 7, "end_a": 11, "start_b": 7, "end_b": 11, "text": "lazy dog. This is", "word_count": 4}, {"start_a": 17, "end_a": 24, "start_b": 16, "end_b": 23, "text": "Both texts share this common passage here.", "word_count": 7}]Found {len(widget.matches)} matching passages
The min_match_words parameter controls how many consecutive words are needed to count as a match.
[{"start_a": 0, "end_a": 4, "start_b": 1, "end_b": 5, "text": "one two three four", "word_count": 4}, {"start_a": 6, "end_a": 9, "start_b": 6, "end_b": 9, "text": "2 3 4", "word_count": 3}]