Permalink
Browse files

Basic loop

  • Loading branch information...
1 parent afde834 commit 4886d68408c51a3a316ca1d7e235efa78fe056e0 @nloadholtes committed Apr 20, 2012
Showing with 33 additions and 3 deletions.
  1. +33 −3 classifiers/manual_classifier.py
@@ -6,12 +6,42 @@
# Manual analysis of tweets
#
-#Load a file
+import sys
+import datetime
+import json
-#Examine each entry
+if __name__ == '__main__':
+ #Load a file
+ if len(sys.argv) < 2:
+ print("A search query is needed")
+ exit(-1)
-#record + or - or pass
+ f = open(sys.argv[1])
+ data = json.loads(f.read())
+ f.close()
+ #Examine each entry
+ reallyquit = False
+ for text in data:
+ print(text)
+ tryagain = True
+ while tryagain:
+ k = raw_input("p,n,o,or q:")
+ tryagain = False
+ #record + or - or pass
+ if k == 'p':
+ pass
+ elif k == 'n':
+ pass
+ elif k == 'o':
+ pass
+ elif k == 'q':
+ reallyquit = True
+ break
+ else:
+ tryagain = True
+ if reallyquit:
+ break
#look neg, see most common words
#look at pos, see most common words

0 comments on commit 4886d68

Please sign in to comment.