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

Some problems. #7

Open
1flei opened this issue Nov 6, 2015 · 0 comments
Open

Some problems. #7

1flei opened this issue Nov 6, 2015 · 0 comments

Comments

@1flei
Copy link

1flei commented Nov 6, 2015

Could I import this module as a part of a course project.

In addition, when I try to test it, I find there seem to be some problems in this module and, so, I recode the _get_sig method as follow
def _get_sig(self,shingle_vec,num_perms):
"""
recoded version of _get_sig
"""
sig = [self._sbucket_size]*num_perms
keys = sorted(shingle_vec.keys())
for r in keys:
#logging.debug('r=%d', r)
h = np.array([hash((r,mask)) % self._sbucket_size for mask in self._memomask])
#logging.debug('h=%s',h)
for i in range(num_perms):
if (h[i] < sig[i]):
sig[i] = h[i]
#logging.debug('mhash=%s',sig)
return sig

and I do not think naming a shingle by the increacing order instead of the random order is a good idea.

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