Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103741 > unrolled thread

Problem in creating list of lists

Started bysubhabangalore@gmail.com
First post2016-02-29 09:34 -0800
Last post2016-02-29 09:34 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Problem in creating list of lists subhabangalore@gmail.com - 2016-02-29 09:34 -0800

#103741 — Problem in creating list of lists

Fromsubhabangalore@gmail.com
Date2016-02-29 09:34 -0800
SubjectProblem in creating list of lists
Message-ID<eaa322fe-a703-4688-804f-0f2ce33c022b@googlegroups.com>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web