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

Match type email #291

Merged
merged 11 commits into from
May 26, 2022
Merged

Match type email #291

merged 11 commits into from
May 26, 2022

Conversation

RavirajBaraiya
Copy link
Contributor

issue #141




public class EmailMatchTypeFunction extends StringSimilarityFunction {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extend StringSimilarityDistanceFunction and use that

public class TestEmailMatchTypeFunction {


@Test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update test scores asserts accordingly. you can invoke the StringSimilarityDistanceFunction with the first part of email and check that you are getting what it returns

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to do that. but, It is giving me this error: Cannot instantiate the type StringSimilarityDistanceFunction
should I leave that part by checking scores with EmailMatchTypeFunction ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, sorry I realized later it is an abstract class. Can you please extend AffineGapSimilarityFunction and use that in the tests as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let me try that.

Copy link
Member

@sonalgoyal sonalgoyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test cases need a relook.

String second = "xyz321@pqr.co";
//first = first.split("@",0)[0];
second = second.split("@",0)[0];
assertEquals(1d, emailMatchFn.call(first, second));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to verify here that the output from emailmatchfn is the same as the output from first part of emails sent to affinegap fn

String second = "xyz321@pqr.co";
first = first.split("@",0)[0];
second = second.split("@",0)[0];
assertEquals(1d, emailMatchFn.call(first, second));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function does the split here, you should not be splitting unless you want to send the split values to AffineGapSimilarityFunction

so validate that original first and second when passed to emailfn returns the same as first part of split string sent to affinegap similarity, ok?

@sonalgoyal sonalgoyal merged commit c38df65 into zinggAI:main May 26, 2022
@RavirajBaraiya RavirajBaraiya deleted the MatchTypeEmail branch June 8, 2022 07:07
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