Paragraph-by-Paragraph Similarity Matrix (D3)
Hover cells to inspect paragraph similarity coefficients| Matched Phrase / Sequence | Source Origin | N-Gram Size | Similarity Class |
|---|---|---|---|
| No match analysis performed. | |||
| Matched Phrase / Sequence | Source Origin | N-Gram Size | Similarity Class |
|---|---|---|---|
| No match analysis performed. | |||
This saved analyzer measures text overlap; its title does not establish plagiarism, intent, or misconduct by an individual. Use a small reproducible example: one text is a b c d, and the comparison is a b c e. With one-word grams, three unique words are shared and five are in the union, so Jaccard is three fifths, or sixty percent. With two-word grams, a b and b c are shared, while c d and c e differ. The intersection is two and union four, giving fifty percent. With three-word grams, a b c is shared but b c d and b c e differ. One over three gives thirty three point three percent; the UI rounds that to thirty three. The bar follows these fractions on a fixed percent scale. Longer phrase windows reduce exact overlap in this example. The same example has three shared word dimensions out of four in each normalized frequency vector, giving cosine similarity zero point seven five. That value does not depend on phrase order. The source function calls itself TF IDF, but it computes normalized word frequencies without an inverse-document-frequency term. Changing the algorithm dropdown changes the label and exported parameter, while runAnalysis still computes the same Jaccard and cosine formulas. Its Levenshtein function is defined but not called by that path. Moving the sensitivity threshold from zero point one to zero point nine also leaves metrics and phrase extraction unchanged. Do not confuse a chosen label with a computation the code actually performs. Set Jaccard and matched-phrase counts use different notions of repetition. For a b a b compared with a b, two-word grams in the first text are a b, b a, and a b again. The unique set has two entries. The source set has only a b, so intersection one over union two gives fifty percent. But phrase extraction walks the original gram list and records a b twice. JSON and CSV therefore contain two repeated matched entries, while the Jaccard set counts one shared unique phrase. The diagram contrasts two unique grams and two recorded matches, then highlights the single shared unique gram. Offline D three is blocked: metric and diff paths run before the heatmap error, so a successful export does not prove the heatmap and table completed. Inspect overlap with context and attribution.
How does this client-side analyzer calculate similarity scores between target passages and source benchmarks?
This workbench tokenizes text inputs entirely within your browser using regular expressions, stripping punctuation and downcasing all words. It then extracts sliding windows of words (n-grams) to compute a Jaccard set overlap ratio (shared n-grams divided by unique n-grams in both passages) alongside normalized word-frequency cosine similarity and a paragraph-level comparison matrix.
The workbench operates strictly on surface-level orthographic tokens without lemmatization, semantic embeddings, citation syntax recognition, or an external database of published literature. Changing the Primary Algorithm Engine dropdown does not alter the headline Jaccard percentage cards, and Levenshtein distance is defined in the script but not invoked in the active comparison pipeline.
When loaded with default sample passages and the n-gram slider set to 3 words, the tool identifies 1 shared phrase between the Suspect Passage and Source 1, yielding a 4% Source 1 Jaccard Similarity and 1 Matched Sequence. Moving the N-Gram Size slider from 3 to 1 switches the sliding window to individual words: the intersection between the target and benchmark vocabularies expands, updating Source 1 Jaccard Similarity to 63%, Source 2 Jaccard Similarity to 11%, and Matched Sequences to 28.
The script splits each passage into an ordered list of lowercase alphanumeric words. For an n-gram parameter n, consecutive sequences of n tokens form sliding phrases. The Jaccard similarity is evaluated as the size of the set intersection of these phrases divided by the size of the set union. As n increases, exact multi-word ordering becomes mandatory, causing overlap scores to drop rapidly when phrasing is altered.
While labeled as 'Cosine TF-IDF', the script computes term frequency relative to each document's total word count without an inverse document frequency (IDF) corpus weighting penalty. The inner product of relative term frequencies is divided by the product of their Euclidean lengths, measuring single-word frequency distribution alignment between the suspect text and Source 1.