fuzzy_bolt 1.0.0 copy "fuzzy_bolt: ^1.0.0" to clipboard
fuzzy_bolt: ^1.0.0 copied to clipboard

A powerful and optimized fuzzy search algorithm with typo tolerance and ranking.

๐Ÿš€ FuzzyBolt - A Fast & Efficient Fuzzy Search Library for Dart #

pub package License

FuzzyBolt is a high-performance fuzzy search library for Dart, designed for fast and accurate matching of search queries within large datasets. It leverages Jaro-Winkler similarity and Damerau-Levenshtein distance to provide ranked results with typo tolerance.

โœจ Features #

  • ๐Ÿ” Fast & Optimized - Uses Jaro-Winkler and Damerau-Levenshtein for accurate matching.
  • โšก Isolate Support - Automatically switches to isolates for large datasets.
  • ๐Ÿ”ข Configurable Thresholds - Adjust strict and typo-matching sensitivity.
  • ๐Ÿ“ Easy-to-Use API - Simple function calls with named parameters.
  • ๐Ÿงช Well-Tested - Comes with robust test cases.

๐Ÿ“ฆ Installation #

Add fuzzy_bolt to your project's pubspec.yaml:

dependencies:
  fuzzy_bolt: ^1.0.0

Then, run:

dart pub get

๐Ÿš€ Usage Example #

import 'package:fuzzy_bolt/fuzzy_bolt.dart';

void main() async {
  final fuzzyBolt = FuzzyBolt();

  List<String> dataset = [
    "apple",
    "banana",
    "grapefruit",
    "strawberry",
    "raspberry",
    "blackberry",
    "blueberry",
    "pineapple",
  ];

  final results = await fuzzyBolt.search(
    dataset: dataset,
    query: "black rasp",
    strictThreshold: 0.85,
    typoThreshold: 0.7,
  );

  print("Top Matches:");
  for (var result in results) {
    print("${result['value']} (Score: ${result['rank']})");
  }
}

๐Ÿ›  Output Example #

Top Matches:
blackberry (Score: 0.89)
raspberry (Score: 0.85)
blueberry (Score: 0.72)

โšก API Reference #

FuzzyBolt.search({dataset, query, strictThreshold, typoThreshold}) โ†’ Future<List<Map<String, dynamic>>>

Parameters: #

๐Ÿ”น dataset (List

๐Ÿ“š Example Use Cases #

โœ… Search & Auto-Suggestions - Improve search bars with intelligent suggestions.
โœ… Spell Checking - Detect and correct minor spelling errors.
โœ… Command Line Interfaces - Enhance fuzzy matching in CLI applications.
โœ… Data Deduplication - Identify similar records in datasets.

๐Ÿ”ฌ Running Tests #

To ensure FuzzyBolt works correctly, run:

dart test

๐Ÿ“œ License #

This package is licensed under the MIT License. See the LICENSE file for details.

โค๏ธ Contributing #

Contributions are welcome! Feel free to open issues, submit PRs, or discuss improvements.

๐Ÿ’ฌ Have questions? Reach out on GitHub Issues!
๐ŸŒŸ Like this package? Give it a star on GitHub! โญ

๐Ÿ”น Made with โค๏ธ by Vishwa Karthik. #

6
likes
0
points
537
downloads

Publisher

verified publishervishwakarthik.in

Weekly Downloads

A powerful and optimized fuzzy search algorithm with typo tolerance and ranking.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection

More

Packages that depend on fuzzy_bolt