So I was going though nltk and saw this code
entities = nltk.chunk.ne_chunk(tagged)
Now my question is that how do you people know which method to use when and what is the order of method calls?
Another strange code I saw was
nltk.corpus.words.words('en')
Now how would one interpret .words followed by .words? Why did we call words method twice here & how do I know when I need to call a method twice?
I just finished "Udacity - Intro. to CS (with Python)" but this "nltk" is getting way too confusing. Please help, have been struggling to get the logic of all these since couple of days.
how do you people know which method to use when?we check the documentation, try to understand the types involved, write some code and fail a few times. Then we eventually learn how to use a lib.nltk.corpus.words.words('en')sounds like poor naming on someone's part. The firstwordsisn't a method call - note the parentheses after the second on and not the first. It might be a variable or module.