I need a small python code that opens a text file, reads that text file, and runs a basic command from the nltk toolkit. The command is as follows:
def extract_nouns(abstract):
import nltk
tokens = nltk.word_tokenize(abstract)
tagged = nltk.pos_tag(tokens)
nouns = [word for word, pos in tagged if (pos == 'NN' or pos == 'NNP' or pos == 'NNS' or pos == 'NNPS')]
word_vector = [[login to view URL]() for x in nouns]
return word_vector
I am getting some error with the text file (attached) when I run the nltk.
Hello, I write in Python and I'm interested in your project. I'm ready to start right now, and I'll do my best to get your code running and eliminate any of the errors that pop up.
$15 USD en 1 día
5,0 (10 comentarios)
3,4
3,4
6 freelancers están ofertando un promedio de $19 USD por este trabajo
Hello. Happy new year!!!
I saw your description and attached files.
I understood it and can do it well.
I have done several project like this.
I'm an expert in Data Structures and Algorithms.
And I know Java ,C/C++,C# and Python well.
I'm interested this project.
I want to discuss with you about this project.
If it's possible,please contact me and explain more detail.
I wait your good reply.
Bye.