forked from sd17spring/TextMining
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbad_words.py
More file actions
31 lines (28 loc) · 1.68 KB
/
bad_words.py
File metadata and controls
31 lines (28 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def bad_words():
list_bad_words = ['george', 'washington', 'adams', 'thomas', 'washingtons'
'jefferson', 'madison', 'james', 'monroe', 'quincy', 'jacksons',
'adams', 'andrew', 'jackson','martin', 'buren', 'tylers',
'henry', 'harrison', 'tyler', 'polk', 'zachary', 'polks', 'taylors',
'taylor', 'millard', 'fillmore', 'pierce', 'fillmores', 'pierces',
'buchanan', 'abraham', 'lincoln', 'andrew', 'johnson', 'ulysses',
'grant','rutherford', 'hayes', 'garfield', 'chester', 'johnsons',
'arthur','grover', 'cleveland', 'benjamin', 'harrison', 'william',
'mckinley','theodore', 'roosevelt','howard', 'grants', 'hayess',
'woodrow', 'wilson','warren', 'harding', 'calvin', 'coolidge',
'herbert', 'hoover','franklin', 'harry', 'truman','dwight','arthurs'
'eisenhower', 'kennedy', 'Lyndon', 'Johnson', 'richard', 'nixon',
'gerald', 'ford','jimmy', 'carter', 'ronald', 'reagan', 'clevelands',
'bill', 'clinton', 'barack', 'obama', 'donald', 'trump', 'trumps',
'president', 'william', 'would', 'which', 'years', 'zachary', 'presidential',
'though', 'while', 'because', 'harrisons', 'mckinleys', 'hardings',
'eisenhowers', 'kennedys', 'johnsons', 'carters', 'reagans', 'clintons',
'state', 'states', 'wilsons', 'after', 'trumans', 'roosevelts', 'garfields',
'coolidges', 'burens', 'lincolns', 'buchanans', 'nixons', 'fords', 'during',
'their', 'united', 'house', 'later', 'american', 'republican', 'jeffersons'
]
f = open('bad_words.txt', 'w')
for string in list_bad_words:
f.write(string + ' ' )
f.close()
if __name__ == '__main__':
bad_words()