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

Sveip for å vise menyen

book
Challenge: Lemmatization with POS Tagging

Oppgave

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.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 8
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

close

Awesome!

Completion rate improved to 3.45

book
Challenge: Lemmatization with POS Tagging

Oppgave

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.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

close

Awesome!

Completion rate improved to 3.45

Sveip for å vise menyen

some-alt