セクション 2. 章 2
single
Challenge: Stemming
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
You are given some text in text variable. Your task is to tokenize this text, remove the stop words, and apply stemming on tokens. To do this:
- Import Porter Stemmer.
- Convert
textto lowercase and save it intext_lower. - Tokenize the
text_lowerstring and save the result intokens. - Load English stop words, convert them to
set, and save instop_words. - Filter out the stop words using list comprehension and save the result in
filtered_tokens. - Create a Porter Stemmer and save it in
stemmer. - Stem the tokens using list comprehension and save the result in
stemmed_tokens.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 2. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください