Challenge: Lemmatization with POS Tagging
Tâche
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:
- Convert
text
to lowercase and save intext_lower
. - Tokenize the
text_lower
string 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
. - Perform POS tagging using the respective function and save the result in
tagged_tokens
. - Create a WordNet Lemmatizer and save it in
lemmatizer
. - Lemmatize the tokens taking their POS tags into account using list comprehension and save the result in
lemmatized_tokens
.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 8
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Awesome!
Completion rate improved to 3.45
Challenge: Lemmatization with POS Tagging
Glissez pour afficher le menu
Tâche
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:
- Convert
text
to lowercase and save intext_lower
. - Tokenize the
text_lower
string 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
. - Perform POS tagging using the respective function and save the result in
tagged_tokens
. - Create a WordNet Lemmatizer and save it in
lemmatizer
. - Lemmatize the tokens taking their POS tags into account using list comprehension and save the result in
lemmatized_tokens
.
Solution
Tout était clair ?
Merci pour vos commentaires !
Awesome!
Completion rate improved to 3.45Section 2. Chapitre 8
single