16 lines
406 B
Python
16 lines
406 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import sys
|
||
|
import bootstrap
|
||
|
import count_words
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
occur = count_words.filter_unlikely(count_words.process(bootstrap.tweets))
|
||
|
ranked = count_words.ranked_list(occur)
|
||
|
|
||
|
out_file = "trumprank.txt"
|
||
|
if len(sys.argv) >= 2:
|
||
|
out_file = sys.argv[1]
|
||
|
print("Writing out to {}...".format(out_file))
|
||
|
count_words.writeout(ranked, out_file)
|