Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. biglist = [['The', 'family'.....]['In', 'the']....]
  2.  
  3. clusters = [['the','in'...],['blood','gene'...]...].
  4.  
  5. test = biglist[0]
  6.  
  7. doc = []
  8.  
  9. for wo in test:
  10. for i, w in enumerate(clusters):
  11. for word in w:
  12. if wo in word:
  13. doc.append(i)
  14. else:
  15. doc.append('NAN')
  16.  
  17. print doc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement