Skip to main content

Description

Computes the Jaro-Winkler similarity between two strings. This metric is particularly effective for short strings like names and addresses. It gives more favorable ratings to strings that match from the beginning. Returns a value between 0 (no similarity) and 1 (exact match).

Syntax

Parameters

Returns

Type: number (float) A similarity score between 0 and 1:
  • 1.0 indicates an exact match
  • 0.0 indicates no similarity
  • Higher values indicate greater similarity

Examples

Example 1: Name Matching

Output:

Example 3: Deduplication by Company Name

Notes

  • Particularly effective for short strings (names, addresses)
  • Gives higher weight to strings that match from the beginning
  • Handles null values by returning appropriate default values
  • Case-sensitive comparison
  • More forgiving than exact match but stricter than pure Jaro similarity
  • Commonly used in record linkage and deduplication tasks

See Also

Frequently Asked Questions

Use Jaro-Winkler for comparing short strings like names and addresses where prefix similarity matters. Use Levenshtein when you need an exact edit distance count.
Yes. flex.text.jaroWinkler performs a case-sensitive comparison. Apply toLower() to both strings for case-insensitive matching.