Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Last active December 28, 2019 16:08
Show Gist options
  • Save GeorgeSeif/fada7882a0aad6819087369ecd8c93d8 to your computer and use it in GitHub Desktop.
Save GeorgeSeif/fada7882a0aad6819087369ecd8c93d8 to your computer and use it in GitHub Desktop.
import nltk
sentence = "My name is George and I love NLP"
tokens = nltk.word_tokenize(sentence)
print(tokens)
# Prints out ['My', 'name', 'is', 'George', 'and', 'I', 'love', 'NLP']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment