NLP, Topic Modeling, Data Science, Nlp Tutorial, Machine Learning.
spaCy to extract their lemmas, which are the canonical form of words. import spacy import en_core_web_sm nlp = en_core_web_sm.load() def extract_nouns(texts): output = [] for doc in nlp.pipe(texts): nouns = " ".join(token.lemma_ for token in doc if token.pos_ == 'NOUN') output.append(nouns) return