Question

26
Views
Close popover
Tata Satish Babu (TataS472)
NBFC

NBFC
CA
TataS472 Member since 2012 7 posts
NBFC
Posted: November 6, 2020
Last activity: November 11, 2020
Solved

Not able to use the method getFuzzyDistance from "org.apache.commons.lang.StringUtils" apachage commons package

Pega has  the function "stringDistance" which has getLevenshteinDistance method in it. Currently we are using this function to calcuate string matching percentage. But we wanted to use getFuzzyDistance method as well from the same package. So when I tried to create function to use the getFuzzyDistance method getting below error while compiling the function.

"The method getFuzzyDistance(String, String) is undefined for the type StringUtils"

I have added apache commons package  "org.apache.commons.lang.StringUtils" in Library and generated the Library.

Please refer below link to know about Levenshtein Distance and Fuzzy Distance.

https://commons.apache.org/proper/commons-lang/javadocs/api-3.8.1/org/apache/commons/lang3/StringUtils.html#getFuzzyDistance-java.lang.CharSequence-java.lang.CharSequence-java.util.Locale-

anyone had this kind of issue with apache commons ? 

Thank you

 

***Edited by Moderator: Pooja to change category from General to Product, add product tag***
Pega Platform