Skip to content

Fuzzy fuzz partialtokensetratio

github-actions[bot] edited this page Aug 27, 2026 · 26 revisions

Development build. This page describes main, not a released package. The latest published Lodestar.Fuzzy is 0.4.0 — read its documentation.

Fuzz.PartialTokenSetRatio

Word sets, compared over the best-matching window.

public static double PartialTokenSetRatio(string a, string b)

Parametersa and b are the strings to compare.

Returnsdouble in [0, 100]: the word sets are formed, then PartialRatio is applied.

Example — a subset of the words, scored as a fragment.

using Lodestar.Fuzzy;

string query = "mariners vs angels";
string candidate = "los angeles angels vs seattle mariners";

double score = Fuzz.PartialTokenSetRatio(query, candidate);  // => 100

Remarksthe most forgiving of the seven, and the one to justify before using. It ignores word order, ignores extra words, and scores the best window rather than the whole — three allowances at once, so a 100 here says much less than a 100 from Ratio.

It earns its place on messy, human-entered text where every one of those three differences is noise. On clean data it will merge records that should stay apart.

Applies to — net10.0, netstandard2.0.

See alsoFuzz.TokenSetRatio, Fuzz.WRatio.

Lodestar

Project

Clone this wiki locally