Problem in creating list of lists

subhabangalore at gmail.com subhabangalore at gmail.com
Mon Feb 29 12:34:45 EST 2016


I have few sentences, like, 

the film was nice.  
leonardo is great. 
it was academy award.

Now I want them to be tagged with some standards which may look like,

the DT film NN was AV nice ADJ
leonardo NN is AV great ADJ
it PRP was AV academy NN award NN

I could do it but my goal is to see it as,
[[('the','DT'),('film', 'NN'),('was','AV'),('nice','ADJ')],[('leonardo','NN'),('is','AV'),('great','ADJ')],[('it','PRP'),
('was','AV'),('academy','NN'),('award','NN')]]

that is a list of lists where in each list there is a set of tuples. 
I could solve each one like I am getting 
one list with tuples, but not all within one.
As it is PoS Tagging so I am not being able to use zip.
If any one may please suggest. 

If any one may kindly suggest a solution.
Thanks in advance.



More information about the Python-list mailing list