MarketplaceListingsCustom ActivityDamerau–Levenshtein Distance - String Similarity

Damerau–Levenshtein Distance - String Similarity

Bronze Certified

Custom Activity

1 reviews

191

Damerau–Levenshtein Distance - String Similarity

Bronze Certified

Custom Activity

1 reviews

191


Summary

Calculates the more robust Damerau-Levenshtein distance between two strings. Includes an activity for comparing a string against an array of strings to select the closest match.

carouselImage0

Overview

The classical Levenshtein distance metric allows for the comparison between any two arbitrary strings. The "edit distance" measures how many additions, substitions, or deletions are needed to convert one string into another. While this is a powerful way to compare strings, it does have its limitations.

The Damerau-Levenshtein distance is a little more robust, in that it includes transpositions/permutations as one way to manipulate a string. For example, "Hello" and "Helol" would have a D-L distance of 1, instead of 2, because it is possible to transpose the "o" and the "l".


This library includes a lightweight D-L distance calculator, written in C#, which can take in two strings and output a distance between these two strings.

Because many use-cases involve selecting an individual string from a collection of strings, this library also includes an activity which takes in a collection of strings and a chosen string, and it outputs the string from the original collection that matches most to the chosen string.

This activity is meant to be used in workflows that include tokenization of texts, such that one token needs to be extracted from a larger body.

Benefits


Published: 09 Apr 2021 | Updated: 09 Apr 2021

Amar Srivastava
RPA Developer

License

MIT


Code Language

Visual Basic


Runtime

.NET Framework


Tags

nlp
string
distance
Similarity
Match
String Similarity
C#
levenshtein
Damerau-Levenshtein
Damerau

Compatibility

Library created using UiPath 2021.10.6, but should be back-compatible to 2019.10.1.


Dependencies

UiPath.System.Activities --> 2010.10.4


Similar Listings