ml_fuzzy_matcher 0.0.1
ml_fuzzy_matcher: ^0.0.1 copied to clipboard
A Dart package for fuzzy string comparison using Levenshtein, Jaccard, and Cosine algorithms. Supports Turkish character normalization.
import 'package:ml_fuzzy_matcher/ml_fuzzy_matcher.dart';
void main() {
final matcher = FuzzyMatcher(
algorithm: FuzzyAlgorithm.levenshtein,
normalizeDiacritics: true,
);
final pairs = [
['çalışmak', 'calismak'],
['ışık', 'isik'],
['flutter', 'fluter'],
['developer', 'developr'],
['araba', 'ev'],
];
for (final pair in pairs) {
final score = matcher.compare(pair[0], pair[1]);
print('Similarity between "${pair[0]}" and "${pair[1]}" → ${score.toStringAsFixed(2)}');
}
}