Hi everybody I am trying to calculate the Ratcliff-Obershelp string similarity between two pairs of column names using the Java Snippet node using this library, which was added in the Additional Libraries tab.
The website implementation shows this code:
import info.debatty.java.stringsimilarity.*;
public class MyApp {
public static void main(String[] args) {
RatcliffObershelp ro = new RatcliffObershelp();
// substitution of s and t
System.out.println(ro.similarity("My string", "My tsring"));
// substitution of s and n
System.out.println(ro.similarity("My string", "My ntrisg"));
}
}
The attached workflow that come from here, uses the Jaccard, but I am unable to use the Ratcliff-Obershelp metric.
Hi,
The workflow you linked uses version 0.19 of the library. The Ratcliff Obershelp distance was only added in the most recent 2.0.0 version, though. You’ll need to download a new jar from here and it should work.
Kind regards,
Alexander
You appear to have introduced a 2 into the constructor since your first post. I looked at the website link from your initial post and don’t see an example of this.
Removing the 2 again removes the compilation error.