+ 1

how to use nltk in python

i want to perform text processing on text file.

3rd Dec 2016, 2:37 AM
Shikha Pandey
Shikha Pandey - avatar
4 odpowiedzi
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?
3rd Dec 2016, 4:57 PM
Sapphire
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.
4th Dec 2016, 2:55 AM
Shikha Pandey
Shikha Pandey - avatar
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.
4th Dec 2016, 7:07 AM
Sapphire
0
i tried with this code , but its not run successfully.
4th Dec 2016, 10:02 AM
Shikha Pandey
Shikha Pandey - avatar