Spaces:
Runtime error
Runtime error
Update replace_explitives.py
Browse files- 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 == "
|
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
|