Method FindFuzzy
FindFuzzy(PageElement, string, FuzzySearchOptions)
Performs token-aware fuzzy search using Damerau–Levenshtein distance over sliding windows of the page text. Useful when the source contains OCR noise or minor typos. Normalization (whitespace/diacritics/optional char-stripping) is applied to both the page text and the query.
public List<TextMatch> FindFuzzy(PageElement page, string query, FuzzySearchOptions fuzzyOptions = null)
Parameters
pagePageElementThe page to search. Must not be
null.querystringThe text to locate approximately. Must not be
null.fuzzyOptionsFuzzySearchOptionsFuzzy matching parameters (edit distance, min score, max results, context). May be
nullfor defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
pageorqueryisnull.
FindFuzzy(IEnumerable<PageElement>, string, FuzzySearchOptions)
Performs fuzzy search across multiple pages.
public List<TextMatch> FindFuzzy(IEnumerable<PageElement> pages, string query, FuzzySearchOptions fuzzyOptions = null)
Parameters
pagesIEnumerable<PageElement>Pages to search. Must not be
null.querystringApproximate text to locate. Must not be
null.fuzzyOptionsFuzzySearchOptionsFuzzy matching parameters. May be
nullfor defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
pagesorqueryisnull.