GH_StringMatcher

public class GH_StringMatcher
Utility class for finding matches in a database of Strings.

Constructors

GH_StringMatcher

#
public GH_StringMatcher()

Methods

ComputeWeight

#
public static int ComputeWeight(string value, string key, GH_MatchLevel level, StringComparison comp)
Compute the weight of the match. Utility function that performs specified match types until a match is found.
value (string)Value to match.
key (string)Key to match against.
level (GH_MatchLevel)Matching level to apply (multiple levers are possible).
comp (StringComparison)String comparison to use during matching.
An integer describing the weighting of the match.

ComputeWeight

#
public static int ComputeWeight(string value, string key, StringComparison comp)
Compute the weight of the match. Utility function that performs all match types until a match is found.
value (string)Value to match.
key (string)Key to match against.
comp (StringComparison)String comparison to use during matching.
An integer describing the weighting of the match.

LevenshteinDistance

#
public static int LevenshteinDistance(string A, string B)
Bottom up implementation of the Levenshtein Distance algorithm. see: http://en.wikipedia.org/wiki/Levenshtein_distance for further details.
A (string)Base string. Case sensitive.
B (string)Target string. Case sensitive.
Number of edit operations required to change A into B.