Advertisement
lamiastella

Untitled

Mar 4th, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. [jalal@goku sentiment]$ head -n99 runjob.sh 10tweets.txt ; ./runjob.sh
  2. ==> runjob.sh <==
  3. #!/bin/bash
  4.  
  5. n=1
  6.  
  7. while read -u 3 -r line; do
  8. echo $n "${line::30}"
  9. python entity_sentiment.py sentiment-entities-text "$line" > "$((n++)).json"
  10. done 3< 10tweets.txt
  11.  
  12. ==> 10tweets.txt <==
  13. Trump on the other hand goes all in on water boarding AND some. #GOPDebate
  14. RT @wpjenna Donald Trump promises that he will not touch the 2nd amendment -- "unless we're going to make it stronger."
  15. Trump 23%, Rubio 19%, Kasich & Bush 14%, Christie 10%, Cruz 9% #NHPrimary
  16. @realDonaldTrump Thank you for saying you won't use vulger language anymore. Talk about Sanders & Clinton. Take Cruz as VP. Mexican votes!!!
  17. RT @SurfPHX Mr. Trump @realDonaldTrump tweeted 25 minutes ago. You all do realize, that our future President hardly sleeps. He's a Fighter and a Worker!
  18. go, Bernie #DemDebate
  19. Sanders calls out Clinton on taking Foreign Policy advice from Warmonger Henry Kissinger https://t.co/xT5J4uh4m4 via @YouTube
  20. Cruz, Rubio, and the Moral Bankruptcy of Progressive Identity Politics https://t.co/kSQstJXtKO via @NRO
  21. RT @scarylawyerguy "Who does Bernie Sanders listen to on foreign policy." - A question Hillary had to raise b/c the media will not. #DemDebate
  22. Why Did U of California Fire Tenured Riverside Professor? / Ted Cruz and Higher Ed -- ... - https://t.co/zFxa4Q70wh
  23. 1 Trump on the other hand goes a
  24. 1 RT @wpjenna Donald Trump promi
  25. 1 Trump 23%, Rubio 19%, Kasich &
  26. 1 @realDonaldTrump Thank you for
  27. 1 RT @SurfPHX Mr. Trump @realDon
  28. 1 go, Bernie #DemDebate
  29. 1 Sanders calls out Clinton on t
  30. 1 Cruz, Rubio, and the Moral Ban
  31. 1 RT @scarylawyerguy "Who does B
  32. 1 Why Did U of California Fire T
  33. [jalal@goku sentiment]$ ls
  34. 1.json 1000tweets.txt 10tweets.txt aclImdb aclImdb_v1.tar.gz credentials.json entity_sentiment.py gc_test.py reviews runjob.sh sentiment-samples.tar sentiment.py
  35. [jalal@goku sentiment]$ cat runjob.sh
  36. #!/bin/bash
  37.  
  38. n=1
  39.  
  40. while read -u 3 -r line; do
  41. echo $n "${line::30}"
  42. python entity_sentiment.py sentiment-entities-text "$line" > "$((n++)).json"
  43. done 3< 10tweets.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement