mskov commited on
Commit
62b1c9a
1 Parent(s): 8c28395

Update replace_explitives.py

Browse files
Files changed (1) hide show
  1. replace_explitives.py +3 -3
replace_explitives.py CHANGED
@@ -10,11 +10,11 @@ def sub_explitives(textfile, selection):
10
  # print(text)
11
  # sentences = sent_tokenize(textfile)
12
 
13
- if selection == "B":
14
  target_word = r"\bbitch\b"
15
- elif selection == "N":
16
  target_word = r"\bnigga\b"
17
- elif selection == "all":
18
  target_word = r"\bshit\b"
19
  else:
20
  target_word = None
 
10
  # print(text)
11
  # sentences = sent_tokenize(textfile)
12
 
13
+ if selection == "B-Word":
14
  target_word = r"\bbitch\b"
15
+ elif selection == "N-Word":
16
  target_word = r"\bnigga\b"
17
+ elif selection == "All Explitives":
18
  target_word = r"\bshit\b"
19
  else:
20
  target_word = None