ArabicSearch class

Arabic-aware search utilities built on ArabicText normalization.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

matches({required String query, required String text}) → bool
Returns true if query matches somewhere inside text, ignoring diacritics, tatweel, alef variants, yeh variants, teh marbuta, and invisible characters. An empty query never matches.
normalizeForSearch(String text) → String
Normalizes text for search: applies ArabicText.normalize with normalizeTeh: true, then strips invisible characters via ArabicText.stripInvisibleChars. This is more aggressive than ArabicText.normalize's default because search needs to treat teh marbuta and heh as equivalent, unlike display or linguistic use.
rank(String query, List<String> candidates) → List<String>
Sorts candidates by match quality against query: an exact normalized match first, then a normalized-prefix match, then a normalized-contains match. Non-matching candidates are excluded. Ties preserve the original order of candidates.
tokenize(String text) → List<String>
Splits text into normalized, non-empty, whitespace-separated tokens.