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. #

11
likes
0
points
1.21k
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