Skip to content

Fuzzy extractresult

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

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

ExtractResult

One candidate's choice, score and index.

public readonly record struct ExtractResult

PropertiesChoice is the candidate string, Score its similarity in [0, 100], and Index its position in the list that was searched.

Example — the best of several candidates, traced back to its row.

using Lodestar.Fuzzy;

string[] choices = ["apple pie", "apple tart", "banana bread", "cherry pie"];

ExtractResult? best = Process.ExtractOne("appel pie", choices);

string choice = best?.Choice;  // => apple pie
int index = best?.Index ?? -1;  // => 0

RemarksIndex is what makes the result usable. Candidates usually come from a list of records rather than a list of strings, and the score alone cannot say which record matched — matching the string back by value fails the moment two records share one.

A readonly record struct, so it is copied rather than referenced and compares by value.

Applies to — net10.0, netstandard2.0.

See alsoProcess.Extract, Process.ExtractOne.

Lodestar

Project

Clone this wiki locally