likelihood_file_name_match¶
- HSTB.kluster.fqpr_intelligence.likelihood_file_name_match(filenames, compare_file, cutoff=0.6)¶
Find the closest match to compare_file in the list of file names provided (filenames). Use the excellent difflib to do so. Only returns one valid match, the match of highest probability (that is greater than or equal to the cutoff probability)
- Parameters
filenames (
list) – list of file names to compare tocompare_file (
str) – file name we want to compare to filenamescutoff (
float) – probability cutoff for match, will not return matches less than this value in probability
- Returns
one element list fo the closest match, or an empty list if no matches
- Return type
mtch