Created
August 18, 2022 23:02
-
-
Save ahmedbesbes/ffee9fa3edcd07da17c09ff196b24898 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import spacy | |
nlp = spacy.load("en_core_news_sm") | |
texts = ... # a large list of documents | |
docs = [] | |
for doc in nlp.pipe(texts, n_process=os.cpu_count()-1): | |
docs.append(doc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment