पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.2.0

fuzzywuzzy

Dart में लोकप्रिय fuzzywuzzy पैकेज का एक कार्यान्वयन, आपकी सभी फज़ी स्ट्रिंग मैचिंग/खोज की आवश्यकताओं के लिए!

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
72.1 हज़ार
लाइक
153
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add fuzzywuzzy

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

Fuzzywuzzy एक लोकप्रिय फजी स्ट्रिंग मैचिंग लाइब्रेरी का Dart इम्प्लीमेंटेशन है, जो खोज, डुप्लिकेट हटाने और डेटा रिकॉन्सिलिएशन जैसे कार्यों के लिए सटीक और लचीली स्ट्रिंग तुलना की अनुमति देता है। यह Levenshtein दूरी और टोकन-आधारित विधियों जैसे एल्गोरिदम का उपयोग करके स्ट्रिंग के बीच समानता स्कोर की गणना करता है, जिससे त्रुटियों, विविधताओं और लगभग मैच का प्रबंधन करना आसान हो जाता है। यह पैकेज Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्म का समर्थन करता है, जिससे व्यापक संगतता सुनिश्चित होती है। यह हल्का है और Flutter pub के माध्यम से आसानी से एकीकृत किया जा सकता है।

उपयोग

  • टाइपो के साथ टेक्स्ट सर्च
  • डेटा डुप्लीकेशन
  • डेटासेट्स के बीच नाम मिलान
  • टॉलरेंस के साथ स्वचालित सुझाव
  • उपयोगकर्ता इनपुट को डेटाबेस प्रविष्टियों से मैच करना

मुख्य विशेषताएँ

  • Levenshtein दूरी स्कोरिंग
  • टोकन क्रम और सेट अनुपात
  • अक्षर-आकार के बिना मेल खाना
  • क्रॉस-प्लेटफ़ॉर्म समर्थन
  • सरल API एकीकरण

इनके लिए उपयुक्त

  • मजबूत स्ट्रिंग मैचिंग की आवश्यकता वाले डेवलपर्स
  • उपयोगकर्ता-उत्पादित टेक्स्ट इनपुट वाले ऐप्स
  • डेटा क्लीनिंग पाइपलाइंस
  • त्रुटि सहिष्णुता के साथ खोज सुविधाएँ

विचार योग्य बातें

  • बड़े डेटासेट पर धीमा हो सकता है
  • वास्तविक समय उच्च-आवृत्ति मिलान के लिए अनअनुकूलित
  • सटीकता के लिए सावधानी से थ्रेशोल्ड समायोजन की आवश्यकता होती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

FuzzyWuzzy

Tests Coverage Status

This is a Dart port of the popular FuzzyWuzzy python package. This algorithm uses Levenshtein distance to calculate similarity between strings.

I personally needed to use this for my own search algorithms, and there weren't any packages as good as my experience with FuzzyWuzzy was, so here we are. Enjoy!

  • Just one dependency (collection).
  • Pure Dart implementation of the superfast python-Levenshtein.
  • Simple to use.
  • Lightweight.
  • Massive props to the folks over at seatgeek for coming up with the algorithm.

Get started

Add dependency
dependencies:
  fuzzywuzzy: <latest version>

Usage

First, import the package

import 'package:fuzzywuzzy/fuzzywuzzy.dart'
Simple ratio
ratio("mysmilarstring", "myawfullysimilarstirng") // 72
ratio("mysmilarstring", "mysimilarstring")        // 97
Partial ratio
partialRatio("similar", "somewhresimlrbetweenthisstring") // 71
Token sort ratio
tokenSortPartialRatio("order words out of", "words out of order") // 100
tokenSortRatio("order words out of","  words out of order")       // 100
Token set ratio
tokenSetRatio("fuzzy was a bear", "fuzzy fuzzy fuzzy bear")         // 100
tokenSetPartialRatio("fuzzy was a bear", "fuzzy fuzzy fuzzy bear")  // 100
Weighted ratio
weightedRatio("The quick brown fox jimps ofver the small lazy dog", "the quick brown fox jumps over the small lazy dog") // 97
Extract
extractOne(
        query: 'cowboys',
        choices: [
          'Atlanta Falcons',
          'New York Jets',
          'New York Giants',
          'Dallas Cowboys'
        ],
        cutoff: 10,
      ) // (string Dallas Cowboys, score: 90, index: 3)
extractTop(
        query: 'goolge',
        choices: [
          'google',
          'bing',
          'facebook',
          'linkedin',
          'twitter',
          'googleplus',
          'bingnews',
          'plexoogl'
        ],
        limit: 4,
        cutoff: 50,
      ) // [(string google, score: 83, index: 0), (string googleplus, score: 75, index: 5)]
extractAllSorted(
        query: 'goolge',
        choices: [
          'google',
          'bing',
          'facebook',
          'linkedin',
          'twitter',
          'googleplus',
          'bingnews',
          'plexoogl'
        ],
        cutoff: 10,
      ) // [(string google, score: 83, index: 0), (string googleplus, score: 75, index: 5), (string plexoogl, score: 43, index: 7), (string bingnews, score: 29, index: 6), (string linkedin, score: 29, index: 3), (string facebook, score: 29, index: 2), (string bing, score: 23, index: 1), (string twitter, score: 15, index: 4)]
extractAll(
        query: 'goolge',
        choices: [
          'google',
          'bing',
          'facebook',
          'linkedin',
          'twitter',
          'googleplus',
          'bingnews',
          'plexoogl'
        ],
        cutoff: 10,
      ) // [(string google, score: 83, index: 0), (string bing, score: 23, index: 1), (string facebook, score: 29, index: 2), (string linkedin, score: 29, index: 3), (string twitter, score: 15, index: 4), (string googleplus, score: 75, index: 5), (string bingnews, score: 29, index: 6), (string plexoogl, score: 43, index: 7)]
Extract using any a list of any type

All extract methods can receive List<T> and return List<ExtractedResult<T>>

class TestContainer {
  final String innerVal;
  TestContainer(this.innerVal);
}

extractOne<TestContainer>(
        query: 'cowboys',
        choices: [
          'Atlanta Falcons',
          'New York Jets',
          'New York Giants',
          'Dallas Cowboys'
        ].map((e) => TestContainer(e)).toList(),
        cutoff: 10,
        getter: (x) => x.innerVal
      ).toString(); // (string Dallas Cowboys, score: 90, index: 3)

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट