Python Forum
Dont quote me on this!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dont quote me on this!
#1
Yoriz Wrote: Wrote:This thread needs the quote feature disabled. [Image: smiley-faces-75.gif]

(4 minutes ago)pythlang Wrote: Wrote:
(25 minutes ago)snippsat Wrote: Wrote:
(1 hour ago)pythlang Wrote: Wrote:I literally do not understand the difference.
Would you be able to explain in general what just happened?
"tokenized" is now given as a argument to the function,this make it clearer that is shall be used in function.
Global variables are usually not a good thing at all,will soon get messy.

Thanks for the clarification.

If I were adding code like this
def process_content():
    try:
        for i in tokenized:
            words = nltk.word_tokenize(i)
            tagged = nltk.pos_tag(words)
             
            chunkGram = r"""Chunk: {<RB.?>*<VB.?>*<NNP><NN>?}"""
 
            chunkParser = nltk.RegexpParser(chunkGram)
            chunked = chunkParser.parse(tagged)
 
            chunked.draw()
 
    except Exception as e:
        print(str(e))
 
process_content()
How would I write it instead using your method?

by the way, this is where "chunked.draw()" fails and I get no output to the screen because I'm not sure if my matplotlib path is correct.

(7 minutes ago)Yoriz Wrote: Wrote:This thread needs the quote feature disabled. [Image: smiley-faces-75.gif]

"What do you mean?"

-Justin Bieber

(2 minutes ago)Yoriz Wrote: Wrote:
(7 minutes ago)Yoriz Wrote: Wrote:This thread needs the quote feature disabled. [Image: smiley-faces-75.gif]

(4 minutes ago)pythlang Wrote: Wrote:
(25 minutes ago)snippsat Wrote: Wrote:
(1 hour ago)pythlang Wrote: Wrote:I literally do not understand the difference.
Would you be able to explain in general what just happened?
"tokenized" is now given as a argument to the function,this make it clearer that is shall be used in function.
Global variables are usually not a good thing at all,will soon get messy.

Thanks for the clarification.

If I were adding code like this
def process_content():
    try:
        for i in tokenized:
            words = nltk.word_tokenize(i)
            tagged = nltk.pos_tag(words)
             
            chunkGram = r"""Chunk: {<RB.?>*<VB.?>*<NNP><NN>?}"""
 
            chunkParser = nltk.RegexpParser(chunkGram)
            chunked = chunkParser.parse(tagged)
 
            chunked.draw()
 
    except Exception as e:
        print(str(e))
 
process_content()
how would I write it instead using your method?

by the way, this is where "chunked.draw()" fails and I get no output to the screen because I'm not sure if my matplotlib path is correct.

[Image: bonk.gif] [Image: smiley-faces-75.gif]

If you cant beat them join them [Image: funnyface.gif]
Reply
#2
wow
Think
Recommended Tutorials:
Reply
#3
(Oct-20-2016, 09:48 PM)metulburr Wrote: wow
Think

Is there really any need for people to quote a previous posts to reply to it when its right there above the one you just made. Coffee
Reply
#4
Not really i was quote 2 lines not the whole previous post,did you miss this?
Reply
#5
Don't take it personally Tongue
It wasn't just your posts check the whole thread, pretty much every post was a quote of the previous one LOL
Reply
#6
No problem,i think wee agree Wink
It can be annoying when someone go mad with the quote button.
Reply
#7
Quote:Is there really any need for people to quote a previous posts to reply to it when its right there above the one you just made. 

I usually use the fast quote to select a portion of the quote i want to show.......and its also probably out of habit from the old forum. But quoting the post is easier than grabbing specific portions....probably is why people do that.
Recommended Tutorials:
Reply
#8
(Oct-20-2016, 10:06 PM)metulburr Wrote:
Quote:Is there really any need for people to quote a previous posts to reply to it when its right there above the one you just made. 

I usually use the fast quote to select a portion of the quote i want to show.......and its also probably out of habit from the old forum. But quoting the post is easier than grabbing specific portions....probably is why people do that.

this is what was happening in that thread
Reply
#9
(Oct-20-2016, 10:08 PM)Yoriz Wrote:
(Oct-20-2016, 10:06 PM)metulburr Wrote:
Quote:Is there really any need for people to quote a previous posts to reply to it when its right there above the one you just made. 

I usually use the fast quote to select a portion of the quote i want to show.......and its also probably out of habit from the old forum. But quoting the post is easier than grabbing specific portions....probably is why people do that.

this is what was happening in that thread

And then this Funnyface

But don't quote me on this Hypnotic
Reply
#10
(Oct-20-2016, 10:09 PM)Yoriz Wrote: But don't quote me on this  Hypnotic
Okay,Ooops!  Whistle
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Monty Python Quote Most Applicable to Programming ichabod801 4 2,925 Nov-07-2019, 03:25 PM
Last Post: stullis
  Dont keep this alive! Kai. 4 4,723 Nov-07-2016, 07:37 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020