Skip to content

A high-performance Python utility that identifies the nearest string matches within sequences using customizable accuracy thresholds. It features robust delimiter support, making it ideal for filtering names, logs, or messy datasets with ease.

Notifications You must be signed in to change notification settings

UserJoo9/String-Closest-Match-Filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String Closest Match Filter

Filter to get a closest match string from a sequence (touple, list) with high accuracy

#Features

  • works with any type of delimiters
  • customizeable accuracy
  • very fast and smooth

Simple Example

from StringClosestMatchFilter import get_closest_match_from_sequence

query = "ahmd mos"
list_of_names = ["ahmed gamal", "ahmed mostafa", "ebrahim", "ashraf", "youssef alkhodary", "yahya alkhodary", "mousa ahmed", "moataz gamal"]
result = get_closest_match_from_sequence(query, list_of_names, accuracy=0.8) #Default accuracy is 0.7
print(result)

output: 'ahmed mostafa'

Example With Delimiters

from StringClosestMatchFilter import get_closest_match_from_sequence

query = "mostfa"
list_of_names = ["ahmed, gamal", "ahmed.mostafa", "ebrahim", "ashraf", "youssef alkhodary", "yahya alkhodary", "mousa ahmed", "moataz gamal"]
result = get_closest_match_from_sequence(query, list_of_names, accuracy=0.8) #Default accuracy is 0.7
print(result)

output: 'ahmed.mostafa'

About

A high-performance Python utility that identifies the nearest string matches within sequences using customizable accuracy thresholds. It features robust delimiter support, making it ideal for filtering names, logs, or messy datasets with ease.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages