text_comparison_score_codespark 1.0.0
text_comparison_score_codespark: ^1.0.0 copied to clipboard
String similarity for Dart & Flutter. Calculate match percentages using Levenshtein, Damerau-Levenshtein, and Jaro-Winkler. Supports fuzzy matching and case-insensitive comparison.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-06-09 #
Added #
- Damerau-Levenshtein Distance algorithm (
ComparisonAlgorithm.damerauLevenshtein).- Extends standard Levenshtein distance by treating adjacent character transpositions
(e.g.
"teh"→"the") as a single edit rather than two, producing noticeably more accurate scores for real-world keyboard typos. - Implemented using the Optimal String Alignment (OSA) approach — same O(m×n) time and space complexity as the existing Levenshtein algorithm.
- Extends standard Levenshtein distance by treating adjacent character transpositions
(e.g.
- Added unit tests covering transposition detection, identity, empty-string, and case-insensitive edge cases for the new algorithm.
Documentation #
- Updated
README.md: added Damerau-Levenshtein to Features, Usage examples with side-by-side output vs standard Levenshtein, and removed it from Future Updates. - Bumped installation snippet version to
^0.1.0.
0.0.9 - 2026-06-05 #
Fixed #
- Trimmed
descriptioninpubspec.yamlfrom 228 chars to 167 chars to satisfy the pub.dev 180-character limit and avoid a pub points deduction.
0.0.8 - 2026-06-05 #
Documentation #
- Rewrote
descriptioninpubspec.yamlto a keyword-rich, SEO-optimised sentence covering fuzzy matching, string similarity, match percentages, Levenshtein, and Jaro-Winkler. - Added
topicstopubspec.yaml(string-similarity,fuzzy-matching,string-comparison,text-similarity,levenshtein-distance) for improved pub.dev search ranking. - Replaced the one-line README description with a full SEO-focused sentence targeting common search terms (similarity score, fuzzy matching, string distance, Dart, Flutter).
- Moved author / maintainer credit to directly under the package title in
README.md. - Added Use Cases section to
README.mdlisting real-world scenarios: fuzzy search, typo detection, duplicate matching, name matching, data validation, and more.
0.0.7 - 2026-06-03 #
Documentation #
- Added pub.dev version, pub points, pub likes, license, platform, and category badges to
README.md. - Added screenshots gallery to
README.md(3 iPhone 15 Plus simulator captures). - Registered all three demo screenshots in
pubspec.yamlso pub.dev displays them on the package page.
Example #
- Rewrote
example/main.dartas a full Flutter UI demo app showcasing all 8 comparison scenarios with score bars, algorithm badges, and explanatory captions.
0.0.5 - 2024-08-25 #
Added #
- Added the
Jaro-Winkler Distancealgorithm to theTextComparisonScoreclass.- This algorithm provides a string similarity score with more favorable ratings for strings that share a common prefix.
- Added support for comparing strings using Jaro-Winkler Distance and calculating match percentage.
- Updated
README.mdwith usage examples and details on when to use the Jaro-Winkler algorithm.
0.0.4 - 2024-08-13 #
Added #
- Added
caseSensitiveparameter tomatchPercentagemethod for optional case sensitivity in string comparison. - Updated
_levenshteinDistancemethod to handle case sensitivity based on thecaseSensitiveparameter.
0.0.2 - 2024-08-13 #
Added #
- Added screenshots showcasing example code and output to the documentation for better understanding.
- Improved documentation with additional examples and explanations for various use cases of the
TextComparisonScoreclass. - Updated
README.mdwith a more detailed usage guide and visual aids. - Enhanced package performance and code quality with minor optimizations.
0.0.1 - 2024-08-09 #
Added #
- Initial release of the
text_comparison_score_codesparkpackage. - Implemented the
TextComparisonScoreclass with the following features:matchPercentage(String s1, String s2): Returns the match percentage between two strings based on the Levenshtein distance algorithm.
- Provided comprehensive unit tests for various cases including identical strings, completely different strings, and comparisons involving empty strings.
- Detailed documentation and usage examples in the
README.md. - License: MIT.
