def main(): dict_of_software_counts = {"Web":0} dict_of_country_names = {} for i in os.listdir(sys.argv[1]): if i.endswith(".txt"): in_file = sys.argv[1] + i tweets = get_tweets(in_file) #count_software_occurence(tweets, dict_of_software_counts) count_country_names(tweets, dict_of_country_names)
def main(): dict_of_software_counts = {"Web": 0} dict_of_country_names = {} for i in os.listdir(sys.argv[1]): if i.endswith(".txt"): in_file = sys.argv[1] + i tweets = get_tweets(in_file) #count_software_occurence(tweets, dict_of_software_counts) count_country_names(tweets, dict_of_country_names)
def main(): #in_file = "C:\Users\Jac21ASUS\Documents\~School2012\CSCE 221\WORK\CodingGig_2013\data\sample\geo.2013-08-26_23-45.txt" #in_file = os.getcwd() + "geo.2013-08-26_23-45.txt" all_tweets = [] for root, dirs, files in os.walk("2013_1_1"): for fname in files: print fname in_file = root + "/" + fname tweets = get_tweets(in_file) #print len(tweets) all_tweets.extend(tweets) #in_file = "2013_1_1" #tweets = get_tweets(in_file) count_expressions(tweets) count_expressions_two(tweets)
def main(): in_file = "/home/vandana/Dropbox/codinggig/data/sample/geo.2013-08-26_23-45.txt" tweets = get_tweets(in_file) count_expressions(tweets)