Function weighSimilarityByCharacter

  • Measures similarity between two strings, taking into account the common characters and their positions. Jaro-Winkler is often used in record linkage and data cleansing to improve the accuracy of string matching, particularly for names and addresses, by giving more weight to the common prefix of the strings and penalizing longer string differences. It is more optimal for varied text than Levenshtein distance, which is better for similar text.

    Parameters

    • s1: string

      First string

    • s2: string

      Second string

    Returns number

    Jaro-Winkler similarity score