Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import subprocess as sub
  2. import d2vec_kmeans as d2v
  3. import numpy as np
  4.  
  5. # pull in text table
  6. raw = sub.Popen(['cat', '/Users/Nick/Desktop/dtas/ContagiousIndex/DOC2VEC/DATA/rawtextfinal.txt'], stdout=sub.PIPE)
  7. raw = raw.communicate()[0].split('\n')
  8. raw = [tuple(ele.split('\t')) for ele in raw if ele != '' and len(ele.split('\t')) == 5]
  9.  
  10. # store text
  11. raw_text = list(zip(*raw))[4]
  12. raw_text
  13. ids = list(zip(*raw))[0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement