Skip to content

Instantly share code, notes, and snippets.

@romanegloo
Created December 12, 2018 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romanegloo/b17157d20854209e1ad317d6ffddb794 to your computer and use it in GitHub Desktop.
Save romanegloo/b17157d20854209e1ad317d6ffddb794 to your computer and use it in GitHub Desktop.
Multithreading spaCy's parser
import spacy
nlp = spacy.load('de')
for doc in nlp.pipe(texts, n_threads=16, batch_size=10000):
analyse_text(doc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment