string_search_algorithms 2.0.0
string_search_algorithms: ^2.0.0 copied to clipboard
Fast Dart library for string similarity and substring search with configurable engines, normalization, and caching. Pure Dart and null-safe.
Changelog #
All notable changes to this package will be documented in this file.
2.0.0 #
Breaking #
- Require Dart 3.13.5 or later (Flutter 3.47.7 or later for Flutter projects). Upgrade the SDK before updating this package.
Fixed #
- Prevent Overlap and Tversky from treating different strings shorter than the configured n-gram size as perfect matches.
- Reject infinite Tversky alpha and beta parameters with
InvalidConfigurationException. - Preserve composite weighted-mean scores when large finite weights would otherwise overflow.
- Correct documentation for overlapping substring matches and which similarity metrics use custom tokenization.
1.1.0 #
Added #
SimilarityAlgorithm.composite: a calibrated ensemble metric that combines Jaro-Winkler, Dice, Cosine, and Overlap witnesses into one stable score. Robust across typos, word reordering, and containment, and safe to use infindMatches/rankByRelevancebecause every pair is scored comparably.CompositeOptionsandCompositeCombinerto configure the combiner (scaledMax,weightedMean,max), witness weights, and the per-witness calibration floors (defaults derived empirically; seebenchmark/composite_calibration.dart).ExplainableMetricinterface andExplainedScore: metrics can now explain a score.compareWithDetailspopulatesSimilarityResult.metadatawith the composite's per-witness sub-scores, the combiner, and the dominant witness.
1.0.1 #
Documentation #
- Refresh package description and README introduction copy.
- Update README install snippet for 1.0.1.
1.0.0 #
Added #
- Initial stable release of the similarity and search libraries.
- Instance-based engines with configurable normalization and caching.
- Similarity algorithms: Dice, Levenshtein, Damerau-Levenshtein, OSA, Jaro, Jaro-Winkler, Cosine, Jaccard, Overlap, Tversky, N-gram, Hamming, LCS, Soundex, Metaphone.
- Substring search algorithms: KMP, Boyer-Moore, Rabin-Karp.
- CompiledPattern for repeated substring searches.
- Convenience String extension methods for similarity and search.
- Benchmark scripts under
benchmark/.
Documentation #
- Complete API documentation for all public members.
- Updated README with examples and configuration guidance.