-
Notifications
You must be signed in to change notification settings - Fork 123
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
TCs for String Similarity Distance function #371
TCs for String Similarity Distance function #371
Conversation
navinrathore
commented
Jun 30, 2022
- Used JaccSimFunction class for instanciation as StringSimilarityDistanceFunction is an abstract class.
- Added TC for specific sample strings as inputs.
public void testBothNotEmptyDifferent() { | ||
StringSimilarityDistanceFunction strDistanceFn = new JaccSimFunction("test"); | ||
Double score = strDistanceFn.call("sample text first", "sample text second"); | ||
assertFalse(score == 0d || score == 1d); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add actual similarity as per jaccard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added actual values. Not sure the score values are correct, values are taken from secondstring output
String second = "sample string/with slash:and,."; | ||
Double score = strDistanceFn.call(first, second); | ||
assertFalse(score == 0d || score == 1d); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make the string smaller and put actual similarity by using set overlap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shorten the strings and actual score values