pythonnlpnltknltk-book

How do I read the following lines of code?


Apologies for the basic question as I am quite new to the topic.

 conlltags = [(word, pos, chunktag) for ((word,pos),chunktag)
                     in zip(sentence, chunktags))]

Can you please break the code above in the format given below:

for i in exampleSentence:
    letterByLetter = i
    print(letterByLetter)

Solution

  • I think it is better for you to look up the following subjects:

    This will give you a better understanding of what is happening and it is very useful to use in one of your future projects!