-
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
Match type email #291
Match type email #291
Conversation
rename variable and fuction in TestPinCodeMatchTypeFunction class
|
||
|
||
|
||
public class EmailMatchTypeFunction extends StringSimilarityFunction { |
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.
extend StringSimilarityDistanceFunction and use that
public class TestEmailMatchTypeFunction { | ||
|
||
|
||
@Test |
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 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
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.
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 ?
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.
ok, sorry I realized later it is an abstract class. Can you please extend AffineGapSimilarityFunction and use that in the tests as well?
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.
Ok, let me try that.
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.
test cases need a relook.
String second = "[email protected]"; | ||
//first = first.split("@",0)[0]; | ||
second = second.split("@",0)[0]; | ||
assertEquals(1d, emailMatchFn.call(first, second)); |
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.
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 = "[email protected]"; | ||
first = first.split("@",0)[0]; | ||
second = second.split("@",0)[0]; | ||
assertEquals(1d, emailMatchFn.call(first, second)); |
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.
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?
issue #141