Package org.jpass.crypt
Class WordSimilarity
java.lang.Object
org.jpass.crypt.WordSimilarity
This class is used to calculate the similarity between two words using Levenshtein algorithm.
Levenshtein distance link
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
calculateLevenshteinDistance
(String word1, String word2) Calculate the similarity between two words using Levenshtein algorithm.
-
Constructor Details
-
WordSimilarity
public WordSimilarity()
-
-
Method Details
-
calculateLevenshteinDistance
Calculate the similarity between two words using Levenshtein algorithm.- Parameters:
word1
- first wordword2
- second word- Returns:
- the similarity (integer) between the two words
-