Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Stemming | Stemming and Lemmatization
Introduction to NLP

Свайпніть щоб показати меню

book
Challenge: Stemming

Завдання

Swipe to start coding

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:

  1. Import Porter Stemmer.
  2. Convert text to lowercase and save it in text_lower.
  3. Tokenize the text_lower string and save the result in tokens.
  4. Load English stop words, convert them to set, and save in stop_words.
  5. Filter out the stop words using list comprehension and save the result in filtered_tokens.
  6. Create a Porter Stemmer and save it in stemmer.
  7. Stem the tokens using list comprehension and save the result in stemmed_tokens.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 2
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

Awesome!

Completion rate improved to 3.45

book
Challenge: Stemming

Завдання

Swipe to start coding

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:

  1. Import Porter Stemmer.
  2. Convert text to lowercase and save it in text_lower.
  3. Tokenize the text_lower string and save the result in tokens.
  4. Load English stop words, convert them to set, and save in stop_words.
  5. Filter out the stop words using list comprehension and save the result in filtered_tokens.
  6. Create a Porter Stemmer and save it in stemmer.
  7. Stem the tokens using list comprehension and save the result in stemmed_tokens.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

close

Awesome!

Completion rate improved to 3.45

Свайпніть щоб показати меню

some-alt