Need help with nltk

i’m interested in extracting the verb-noun pair from my “task” column, so I first loaded the table using pandas

import pandas as pd

and then the file

DF = pd.read_excel(r’/content/contentdrive/MyDrive/extrac.xlsx’)

After I import nltk and some packages import nltk I create a function to process each text: `

def processa(Text_tasks):



text = nltk.word_tokenize(Text_tasks)
  pos_tagged = nltk.pos_tag(text)
  NV = list(filter(lambda x: x[1] == "NN" or x[1] == "VB", pos_tagged))
  return NV

In the end, I try to generate a list with the results:

results = DF[‘task’].map(processa) and did not appear the list. Can you guys help me?


here is the data: extrac.xlsx - Google Sheets