import nltk
sentence="i love you, so much"
tokens=nltk.word_tokenize(sentence)
print (tokens)
tagged=nltk.pos_tag(tokens)
print tagged[:]
entities=nltk.chunk.ne_chunk(tagged)
print (entities)
'''from nltk.corpus import treebank
t=treebank.parsed_sents('wsj_001.mrg')[0]
t.draw'''
--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nltk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So I typed in the code below and I am not getting a treeIm added the print results below…
I don't know why my tree is not drawing out, if someone could please explain I'd appreciate it very much…Sincerely... Thank you for you time.
import nltk
sentence="i love you, so much"
tokens=nltk.word_tokenize(sentence)
print (tokens)
tagged=nltk.pos_tag(tokens)
print tagged[:]
entities=nltk.chunk.ne_chunk(tagged)
print (entities)
'''from nltk.corpus import treebank
t=treebank.parsed_sents('wsj_0001.mrg')[0]
print (t.draw''')
--