Challenge: Tokenization
Tehtävä
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
text
into sentences and save the result insentences
. - Take the last sentence, convert it to lowercase, and save in
last_sentence
. - Tokenize the
last_sentence
into words and save the result intokens
.
Use the nltk
functions for this purpose.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 4
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 3.45
Challenge: Tokenization
Pyyhkäise näyttääksesi valikon
Tehtävä
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
text
into sentences and save the result insentences
. - Take the last sentence, convert it to lowercase, and save in
last_sentence
. - Tokenize the
last_sentence
into words and save the result intokens
.
Use the nltk
functions for this purpose.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Awesome!
Completion rate improved to 3.45Osio 1. Luku 4
single