Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Lemmatization with POS Tagging | Stemming and Lemmatization
Introduction to NLP

Scorri per mostrare il menu

book
Challenge: Lemmatization with POS Tagging

Compito

Swipe to start coding

Your are given some text in text variable. Your task is to perform a lemmatization with pos tags on this text. To do this:

  1. Convert text to lowercase and save in text_lower.
  2. Tokenize the text_lower string and save the result in tokens.
  3. Load English stop words, convert them to set, and save in stop_words.
  4. Filter out the stop words using list comprehension and save the result in filtered_tokens.
  5. Perform POS tagging using the respective function and save the result in tagged_tokens.
  6. Create a WordNet Lemmatizer and save it in lemmatizer.
  7. Lemmatize the tokens taking their POS tags into account using list comprehension and save the result in lemmatized_tokens.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 8
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

Awesome!

Completion rate improved to 3.45

book
Challenge: Lemmatization with POS Tagging

Compito

Swipe to start coding

Your are given some text in text variable. Your task is to perform a lemmatization with pos tags on this text. To do this:

  1. Convert text to lowercase and save in text_lower.
  2. Tokenize the text_lower string and save the result in tokens.
  3. Load English stop words, convert them to set, and save in stop_words.
  4. Filter out the stop words using list comprehension and save the result in filtered_tokens.
  5. Perform POS tagging using the respective function and save the result in tagged_tokens.
  6. Create a WordNet Lemmatizer and save it in lemmatizer.
  7. Lemmatize the tokens taking their POS tags into account using list comprehension and save the result in lemmatized_tokens.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

close

Awesome!

Completion rate improved to 3.45

Scorri per mostrare il menu

some-alt