Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflowError while using Levenstein scroe() #8

Open
skuladeep24 opened this issue Jul 17, 2023 · 1 comment
Open

StackOverflowError while using Levenstein scroe() #8

skuladeep24 opened this issue Jul 17, 2023 · 1 comment

Comments

@skuladeep24
Copy link

We are facing an issue with the class below in a hadoop job. we are wondering if there are any limitations in using this class for calculating the similarity. Please advise.

Class: com.wcohen.ss.Levenstein

Method invocation:
Levenstein().score(str1, str2)

Error:
ERROR [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.StackOverflowError
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)
at com.wcohen.ss.MemoMatrix.get(MemoMatrix.java:40)
at com.wcohen.ss.NeedlemanWunsch$MyMatrix.compute(NeedlemanWunsch.java:41)

@tfmorris
Copy link

tfmorris commented Aug 2, 2024

You might want to look at the Apache implementation since its documentation specifically references usage with long strings https://commons.apache.org/proper/commons-text/apidocs/org/apache/commons/text/similarity/LevenshteinDistance.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants