+ 1
how to use nltk in python
i want to perform text processing on text file.
4 Respuestas
0
Can you be more specific?
Are you just curious how to split, strip, and join values? Or something to do with reading or writing a text file?
0
I want to perform tokenize, stemming,parsing on text file and extract noun phrases from sentence..
many times tried to import nltk but found error that " no module name is nltk"
thanks for your response.
0
The instructions for this is actually on the front page of nltk.org
"
>>> import nltk
>>> sentence = """At eight o'clock on Thursday morning ... Arthur didn't feel very good. """
>>> tokens = nltk.word_tokenize (sentence)
>>> tokens
['At', 'eight', "o'clock", 'on', 'Thursday', 'morning', 'Arthur', 'did', "n't" 'feel', 'very', 'good', "."]
"
As for the import error, you'll have to ask on their discussion board to troubleshoot your problem.
0
i tried with this code , but its not run successfully.