Last active
December 17, 2019 20:22
-
-
Save glickmac/6c284dfe44972dd8be8a58d4b918459f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open("../data/War_Terms.txt", "r") as f: | |
war_terms = f.readlines() | |
war_terms = [x.split("\n")[0] for x in war_terms] | |
War_Terms_in_Text = set(war_terms) & set(tokens) | |
print('Number of war terms used in the story: '+ str(len(War_Terms_in_Text))) | |
values = [i for i in tokens if i in War_Terms_in_Text] | |
sentences = text.split('.') | |
for item in sentences: | |
if "death" in item: | |
print(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment