BayesianScorer class

Bayesian fuzzy matcher for command palette.

Computes relevance scores using a probabilistic model with match classification (exact > prefix > word-start > substring > fuzzy) and weighted evidence factors (position, word boundaries, gap, title length).

final scorer = BayesianScorer();
final r = scorer.score('gd', 'Go Dashboard');
// r.matchType == MatchType.wordStart
// r.score ≈ 0.82

Constructors

BayesianScorer({bool trackEvidence = false})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trackEvidence bool
Whether to track detailed evidence (slightly slower but explainable).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
score(String query, String title) MatchResult
Score a query against a title.
scoreWithTags(String query, String title, List<String> tags) MatchResult
Score a query against a title with searchable tags.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited