Create your first automation in just a few minutes.Try Studio Web →
by Amar Srivastava
2
Activity
2.9k
Summary
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.
Overview
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.
Features
Features
The main benefit of this library is to offer a rapid calculation of the Damerau-Levenshtein distance for RPA projects that involve text reading. A secondary benefit is to expedite string matching using edit distances, which could save developer time and avoid other intensive solutions such as RegEx.
Additional Information
Additional Information
Dependencies
UiPath.System.Activities --> 2010.10.4
Code Language
Visual Basic
Runtime
Windows Legacy (.Net Framework 4.6.1)
License & Privacy
MIT
Privacy Terms
Technical
Version
1.0.0Updated
March 20, 2021Works with
Studio: 21.10 - 22.10
Certification
Silver Certified
Support
UiPath Community Support