CoolFace
Apppublic

jojortz/llm4research-query-visualization

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
helpers.py21 linesDownload Raw Back to root
1import unicodedata2 3 4def _remove_non_string_characters(string):5    symbols_to_remove = ["Δ"]6    return "".join(7        char8        for char in string9        if unicodedata.category(char)[0] in {"L", "N", "P", "Z"}10        and char not in symbols_to_remove11    )12 13 14def compare_strings_ignore_non_string(string1, string2):15    string1 = _remove_non_string_characters(string1)16    string2 = _remove_non_string_characters(string2)17    if string1 != string2 and string1[0:20] == string2[0:20]:18        print(f"String1: {string1}")19        print(f"String2: {string2}")20    return string1 == string221