fuzzy_compare v1.0.0 API Reference

Modules

This module compares two strings for their similarity and uses multiple approaches to get high quality results

For strings which among shared words also contain many dissimilar words the ChunkSet is ideal

Struct to hold the processed string

This module allows for the preprocessing of strings which will be used in the comparision. Preprocessing is vital for high quality results. During processing the input strings are upcased, all punctuation is stripped, excess whitespace is trimmed and a Map of values is returned which is used by all other comparison functions. This allows for the reuse of preprocessed values and prevents each comparison function from rerunning the preprocessing

In order to match strings whose order might be the only thing separating them the sorted chunks metric is applied. This strategy splits the strings on spaces, sorts the list of strings, joins them together again, and then compares them by applying the Jaro-Winkler distance metric

This module just wraps the String.jaro_distance/2 function but it allows us to use a different comparison function in the future should the need ever arise

This module is used to determine whether all comparison functions should use the simple ratio function or the substring ratio function

This module offers the functionality of comparing strings of different lengths