Cldr.Message.jaro_distance

You're seeing just the function jaro_distance, go back to Cldr.Message module for more information.
Link to this function

jaro_distance(message1, message2, options \\ [])

View Source

Returns the Jaro distance between two messages.

This allows for fuzzy matching of message which can be helpful when a message string is changed but the semantics remain the same.

Arguments

  • message1 is a CLDR message in binary form

  • message2 is a CLDR message in binary form

  • options is a keyword list of options. The default is []

Options

  • :trim determines if the message is trimmed of whitespace before formatting. The default is false.

Returns

  • {ok, distance} where distance is a float value between 0.0 (equates to no similarity) and 1.0 (is an exact match) representing Jaro distance between message1 and message2 or

  • {:error, {exception, reason}}

Examples