Skip to content

Instantly share code, notes, and snippets.

@richashworth
Created September 10, 2021 14:54
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 richashworth/e2f5f30af2e41cb6be1e96047fb1524f to your computer and use it in GitHub Desktop.
Save richashworth/e2f5f30af2e41cb6be1e96047fb1524f to your computer and use it in GitHub Desktop.
climate_change_forms = ["The facts about climate change",
"Changes in our climate",
"The climate is changing rapidly",
"Because the climate has changed,"]
df = DataFrame(climate_change_forms, columns=["Text"])
df['Lemmas'] = list(map(lambda x: ' '.join(list(map(lambda y: y.lemma_, nlp(x)))), climate_change_forms))
HTML(df.to_html(index=False))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment