Challenge: Tokenization
Task
Swipe to start coding
Your are given an excerpt from 'The Adventures of the Musgrave Ritual' in text variable. You need to tokenize the last sentence. To do this:
- Import necessary functions.
- Tokenize
textinto sentences and save the result insentences. - Take the last sentence, convert it to lowercase, and save in
last_sentence. - Tokenize the
last_sentenceinto words and save the result intokens.
Use the nltk functions for this purpose.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 4
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
How does this information apply to real-world situations?
Awesome!
Completion rate improved to 3.45
Challenge: Tokenization
Swipe to show menu
Task
Swipe to start coding
Your are given an excerpt from 'The Adventures of the Musgrave Ritual' in text variable. You need to tokenize the last sentence. To do this:
- Import necessary functions.
- Tokenize
textinto sentences and save the result insentences. - Take the last sentence, convert it to lowercase, and save in
last_sentence. - Tokenize the
last_sentenceinto words and save the result intokens.
Use the nltk functions for this purpose.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 4
single