Challenge: Stop Words
Tarefa
Swipe to start coding
You are given some text in text
variable. Your task is to tokenize it and remove the stop words. To do this:
- Import necessary components.
- Convert it to lowercase and save in
text_lower
. - Load the English stop words list from
nltk
, convert it to aset
, and save it instop_words
. - Tokenize the
text_lower
string using theword_tokenize()
function and save the result intokens
. - Filter out the stop words from
tokens
using list comprehension and save the result intokens_clean
.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 8
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Resumir este capítulo
Explicar o código em file
Explicar por que file não resolve a tarefa
Awesome!
Completion rate improved to 3.45
Challenge: Stop Words
Deslize para mostrar o menu
Tarefa
Swipe to start coding
You are given some text in text
variable. Your task is to tokenize it and remove the stop words. To do this:
- Import necessary components.
- Convert it to lowercase and save in
text_lower
. - Load the English stop words list from
nltk
, convert it to aset
, and save it instop_words
. - Tokenize the
text_lower
string using theword_tokenize()
function and save the result intokens
. - Filter out the stop words from
tokens
using list comprehension and save the result intokens_clean
.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Awesome!
Completion rate improved to 3.45Seção 1. Capítulo 8
single