handle the simple replace case quickly

This commit is contained in:
Paul Gauthier 2023-05-10 18:21:41 -07:00
parent 395cf4c14f
commit 79d38b5d68

View file

@ -7,6 +7,9 @@ from pathlib import Path
def replace_most_similar_chunk(whole, part, replace):
if part in whole:
return whole.replace(part, replace)
similarity_thresh = 0.8
max_similarity = 0