Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

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

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages