pm4py.util.string_distance module#
- pm4py.util.string_distance.argmin_levenshtein(stru: str, list_stri: List[str]) str | None[source]#
Given a string (stru), finds a string in a list of strings (list_stri) that minimizes the Levenshtein distance.
- Parameters:
stru – String (that is compared)
list_stri – List of comparison strings
- Returns:
String (belonging to list_stri) that minimizes the Levenshtein distance with the ‘stru’ argument
- Return type:
argmin_dist
- pm4py.util.string_distance.argmax_levenshtein(stru: str, list_stri: List[str]) str | None[source]#
Given a string (stru), finds a string in a list of strings (list_stri) that maximizes the Levenshtein distance.
- Parameters:
stru – String (that is compared)
list_stri – List of comparison strings
- Returns:
String (belonging to list_stri) that maximizes the Levenshtein distance with the ‘stru’ argument
- Return type:
argmax_dist