class_docstr: This class manages the querying of DBpedia and attaches the found entities to the document
class_docstr_tok: ["This","class","manages","the","querying","of","DBpedia","and","attaches","the","found","entities","to","the","document"]
docstr: It takes a stream of documents, and for each batch of documents, it makes a request to the API
  for each document in the batch, and then yields the processed results of each document
  
  :param stream: the stream of documents to be processed
  :param batch_size: The number of documents to send to the API in a single request, defaults to
  128 (optional)
docstr_tok: ["It","takes","a","stream","of","documents",",","and","for","each","batch","of","documents",",","it","makes","a","request","to","the","API","for","each","document","in","the","batch",",","and","then","yields","the","processed","results","of","each","document",":","param","stream",":","the","stream","of","documents","to","be","processed",":","param","batch_size",":","The","number","of","documents","to","send","to","the","API","in","a","single","request",",","defaults","to","128","(","optional",")"]
code: def pipe(self, stream, batch_size=128):
      """
      It takes a stream of documents, and for each batch of documents, it makes a request to the API
      for each document in the batch, and then yields the processed results of each document
  
      :param stream: the stream of documents to be processed
      :param batch_size: The number of documents to send to the API in a single request, defaults to
      128 (optional)
      """
      for docs in util.minibatch(stream, size=batch_size):
          with ThreadPool(batch_size) as pool:
              print("batch_size", batch_size)
              # using pool.imap to preserve order and avoid blocking
              for data, doc in zip(
                  pool.imap(self.get_remote_response, docs), docs
              ):
                  self.process_single_doc_after_call(doc, data)
                  yield doc
  
file_path: spacy-dbpedia-spotlight/spacy_dbpedia_spotlight/entity_linker.py
imports: import concurrent.futures
  import sys
  import requests
  import spacy
  from multiprocessing.pool import ThreadPool
  from loguru import logger
  from requests import HTTPError
  from spacy import util
  from spacy.language import Language
  from spacy.tokens import Doc, Span
label_desc: Use image node_id 6 for calling the EntityLinker obj's underlying member method code with example usage: obj.pipe(stream, batch_size) without return types