How many words two clauses share

Legal intelligence

It folds two short fictional sentences into tokens, drops edge punctuation, and reports the size of the shared token set over the size of the combined token set, as a reduced ratio. The same tokens in a different order still count as the same set. Token identity is not meaning.

Letters, spaces, and the marks . , ; : ! ? only. Each sentence is 1 to 180 characters and 2 to 12 tokens after punctuation at the edges is removed. Repeated tokens count once. Digits are refused, so a section number cannot be typed here.

The result appears here when the page script runs.

How it is computed

Method

Each sentence is lowercased and split on whitespace. Punctuation at the ends of a token is removed. The score is the number of tokens that appear in both sets, divided by the number of tokens that appear in either set, reduced by the greatest common divisor. A second flag says whether the token sequences are equal, repeats included, so order is reported and not hidden inside the set score.

Assumptions

A token is a whitespace word, not a stem and not a synonym. Capital letters do not make a new token. The two sentences are the whole text. Nothing outside the two fields is consulted. The sentences are fictional samples, typed for the arithmetic.

Limits

The page does not read a contract. The same token set can still differ in order, and the order flag is the only place that difference appears.

Reproducibility

The inputs are kept in the address bar, so the same link reruns the same calculation. The same sentences produce the same reduced ratio in this engine.