Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from nltk.tokenize import word_tokenize, sent_tokenize
- text = "Hello, Mr. Jacobs. Nice to meet you!"
- sentences = sent_tokenize(text)
- words = word_tokenize(text)
- print (sentences)
- print (words)
Add Comment
Please, Sign In to add comment