-
Notifications
You must be signed in to change notification settings - Fork 6
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
export func insert_sig, query_one, query_sig, query_sig_return_distance,tokens2signature,iter,size #25
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request @Ox0400 . I will take a look during the weekend. |
Hi. Curios, how do you plan on using the new methods ? Personally, I only use Rust part of the project, and do not use the Python bindings. I implemented them to learn Python/Rust integration. |
IM
Hi, yes, I was using from gaoya.simhash import SimHashStringIndex
class SimHashTool(SimHashStringIndex):
def size(self) -> int:
return self.index.size()
def iter(self) -> List[Tuple[int, int]]:
# [(100, 879782272769711604), (101, 879782272769711604)]
return self.index.iter()
def par_bulk_tokens2signatures(self, tokens_list: List[List[str]]) -> List[int]:
return self.index.par_bulk_tokens2signatures(tokens_list)
def par_bulk_insert_sig_pairs(self, id_sig_pairs: List[Tuple[int, int]]) -> int:
self.index.par_bulk_insert_sig_pairs(id_sig_pairs)
return self.size()
def query_tokens_return_distance(self, tokens: List[str]) -> List[Tuple[int,int]]:
return self.index.query_tokens_return_distance(tokens)
def insert_tokens(self, doc_id: int, tokens: List[str]) -> None:
self.index.insert_tokens(doc_id, tokens)
def par_bulk_insert_tokens_pairs(self, id_tokens_pairs: List[Tuple[int, List[str]]]) -> int:
self.index.par_bulk_insert_tokens_pairs(id_tokens_pairs)
return self.size()
# more functions .... |
No description provided.