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

Checking for null case should be done at the token bag level for the Jacard Similarity #24

Open
OlivierBinette opened this issue Apr 13, 2022 · 1 comment

Comments

@OlivierBinette
Copy link
Owner

The check for null case should be done at the token bag level rather than the string level:

if len(s) + len(t) == 0:

I would recommend refactoring jaccard.py as follows:

  1. Have the jacard() function take two token sets as arguments and compute their jaccard similarity (overlap percentage). Checking for empty token bags should be done here.
  2. Have the compare() function deal with the tokenization and anything else (e.g. transforming the distance to a similarity).
@OlivierBinette
Copy link
Owner Author

Tagging @Garrett-Allen

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

1 participant