Skip to content

Commit

Permalink
Merge pull request #7 from Hmkhalla/patch-1
Browse files Browse the repository at this point in the history
fixing concurrent work and input matching
  • Loading branch information
shigapov authored Nov 14, 2022
2 parents 8e32dc5 + fc46c67 commit ed3136a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spacyopentapioca/entity_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@ def pipe(self, stream, batch_size=128):
with concurrent.futures.ThreadPoolExecutor(max_workers=20) as executor:
future_to_url = {executor.submit(
self.make_request, doc): doc for doc in docs}
for doc, future in zip(docs, concurrent.futures.as_completed(future_to_url)):
for future in concurrent.futures.as_completed(future_to_url):
doc = future_to_url[future]
yield self.process_single_doc_after_call(doc, future.result())

0 comments on commit ed3136a

Please sign in to comment.