Skip to content

Commit

Permalink
updated goe_filter so it doesn't use google trans
Browse files Browse the repository at this point in the history
  • Loading branch information
DE0CH committed Jun 21, 2020
1 parent 0161ce9 commit 723668b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion geo_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ def process_files(path, dirs, files, geo_filtered_dict):
os.makedirs('processed')
except FileExistsError:
pass
processes = []
for i in range(100):
multiprocessing.Process(target=worker, args=(q, geo_filtered_dict)).start()
p = multiprocessing.Process(target=worker, args=(q, geo_filtered_dict))
processes.append(p)
p.start()
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'twitter-sentiment-analysis-f22ce784b0a8.json'
try:
for path, dirs, files in os.walk('untarred'):
Expand All @@ -69,3 +72,6 @@ def process_files(path, dirs, files, geo_filtered_dict):
finally:
with open('geo_filtered.pkl', 'wb') as f:
pickle.dump(geo_filtered, f)
for p in processes:
p.terminate()

0 comments on commit 723668b

Please sign in to comment.