//processed = pool.map(self.geoparse, nlped_docs)
//pool.close()
//pool.join()
processed = [self.geoparse(i) for i in nlped_docs]
return processed
After Change
print("batch_geoparsed should be used with threaded searches. Please set `threads=True` when initializing the geoparser.")
nlped_docs = list(nlp.pipe(text_list, as_tuples=False, n_threads=multiprocessing.cpu_count()))
processed = []
for i in tqdm(nlped_docs, disable=not self.progress):
p = self.geoparse(i)
processed.append(p)
return processed