Class TermEditDistance
java.lang.Object
com.google.errorprone.names.TermEditDistance
A utility class for finding the distance between two identifiers. Each identifier is split into
its constituent terms (based on camel case or underscore naming conventions). Then the edit
distance between each term is computed and the minimum cost assignment is found.
-
Constructor Summary
ConstructorDescriptionTermEditDistance
(BiFunction<String, String, Double> editDistanceFn, BiFunction<Integer, Integer, Double> maxDistanceFn) Creates a TermEditDistance Object -
Method Summary
-
Constructor Details
-
TermEditDistance
public TermEditDistance(BiFunction<String, String, Double> editDistanceFn, BiFunction<Integer, Integer, Double> maxDistanceFn) Creates a TermEditDistance Object- Parameters:
editDistanceFn
- function to compute the distance between two termsmaxDistanceFn
- function to compute the worst case distance between two terms
-
TermEditDistance
public TermEditDistance()
-
-
Method Details
-
getNormalizedEditDistance
-