fuzzyfinder package

Submodules

fuzzyfinder.main module

fuzzyfinder.main.fuzzyfinder(input, collection, accessor=<function <lambda>>, sort_results=True)[source]
Parameters:
  • input (str) – A partial string which is typically entered by a user.
  • collection (iterable) – A collection of strings which will be filtered based on the input.
  • accessor (function) – If the collection is not an iterable of strings, then use the accessor to fetch the string that will be used for fuzzy matching.
  • sort_results (bool) – The suggestions are sorted by considering the smallest contiguous match, followed by where the match is found in the full string. If two suggestions have the same rank, they are then sorted alpha-numerically. This parameter controls the last tie-breaker-alpha-numeric sorting. The sorting based on match length and position will be intact.
Returns:

A generator object that produces a list of

suggestions narrowed down from collection using the input.

Return type:

suggestions (generator)

Module contents

fuzzyfinder.fuzzyfinder(input, collection, accessor=<function <lambda>>, sort_results=True)[source]
Parameters:
  • input (str) – A partial string which is typically entered by a user.
  • collection (iterable) – A collection of strings which will be filtered based on the input.
  • accessor (function) – If the collection is not an iterable of strings, then use the accessor to fetch the string that will be used for fuzzy matching.
  • sort_results (bool) – The suggestions are sorted by considering the smallest contiguous match, followed by where the match is found in the full string. If two suggestions have the same rank, they are then sorted alpha-numerically. This parameter controls the last tie-breaker-alpha-numeric sorting. The sorting based on match length and position will be intact.
Returns:

A generator object that produces a list of

suggestions narrowed down from collection using the input.

Return type:

suggestions (generator)