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

TCs for String Similarity Distance function #371

Merged
merged 2 commits into from
Jul 16, 2022

Conversation

navinrathore
Copy link
Contributor

  • Used JaccSimFunction class for instanciation as StringSimilarityDistanceFunction is an abstract class.
  • Added TC for specific sample strings as inputs.

@navinrathore
Copy link
Contributor Author

public void testBothNotEmptyDifferent() {
StringSimilarityDistanceFunction strDistanceFn = new JaccSimFunction("test");
Double score = strDistanceFn.call("sample text first", "sample text second");
assertFalse(score == 0d || score == 1d);
Copy link
Member

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

Copy link
Contributor Author

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);
}
Copy link
Member

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

Copy link
Contributor Author

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

@sonalgoyal sonalgoyal merged commit dca5a9b into zinggAI:main Jul 16, 2022
@navinrathore navinrathore deleted the StringSimilarityFunction branch July 28, 2022 15:58
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

Successfully merging this pull request may close these issues.

2 participants