Skip to main content

Module pattern

Module pattern 

Source

Constants§

ERROR_MARGIN
The margin of error for string similarity scores.

Functions§

glob_to_regex_pattern
Converts a glob pattern to a regex pattern.
is_close_to_upper_bound
Checks if a string similarity score is close to the upper bound (1.0), which (according to the ERROR_MARGIN) indicates a perfect match.
match_filename_with_glob_pattern
Checks if a path’s filename matches a glob pattern.
match_string
Returns a similarity score between two strings using a fuzzy matching algorithm.
string_similarity
Returns a similarity score between two strings using a fuzzy matching algorithm that relies on Jaro-Winkler instead Levenshtein. Use this over match_string.