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
querymatches somewhere insidetext, ignoring diacritics, tatweel, alef variants, yeh variants, teh marbuta, and invisible characters. An emptyquerynever matches. -
normalizeForSearch(
String text) → String -
Normalizes
textfor search: applies ArabicText.normalize withnormalizeTeh: 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
candidatesby match quality againstquery: 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 ofcandidates. -
tokenize(
String text) → List< String> -
Splits
textinto normalized, non-empty, whitespace-separated tokens.