FuzzyNameCandidateSearcher

class FuzzyNameCandidateSearcher(repository: <Error class: unknown class>, maxDistanceRatio: Double = 0.2, minLengthForFuzzy: Int = 4, topK: Int = 10, similarityThreshold: Double = 0.5) : CandidateSearcher

Searches for fuzzy name matches using Levenshtein distance.

Returns a confident match only if exactly 1 candidate matches within the distance threshold.

Parameters

repository

The repository for text search

maxDistanceRatio

Maximum Levenshtein distance as a ratio of the shorter name length. Default is 0.2 (20%), meaning 1 char difference allowed per 5 chars.

minLengthForFuzzy

Minimum name length to apply fuzzy matching.

topK

Maximum candidates to retrieve

similarityThreshold

Minimum similarity score for text search

Constructors

Link copied to clipboard
constructor(repository: <Error class: unknown class>, maxDistanceRatio: Double = 0.2, minLengthForFuzzy: Int = 4, topK: Int = 10, similarityThreshold: Double = 0.5)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Which ResolutionLevel a confident hit from this searcher counts as, for the per-level telemetry EscalatingEntityResolver logs. Each searcher declares its own tier so the counts stay accurate whatever the chain's length or order. Defaults to ResolutionLevel.HEURISTIC_MATCH; exact-lookup searchers report ResolutionLevel.EXACT_MATCH and vector search reports ResolutionLevel.EMBEDDING_MATCH.

Functions

Link copied to clipboard
open override fun search(suggested: SuggestedEntity, schema: <Error class: unknown class>): SearchResult

Search for candidates matching the suggested entity.