correct hitler_words and start analysis
This commit is contained in:
+7755
-24901
File diff suppressed because it is too large
Load Diff
@@ -21,17 +21,17 @@ def get_words_from_line(line):
|
||||
|
||||
hitler_words = []
|
||||
for i in range(1, 7):
|
||||
with open(f'hitler_texts/hitler_rede_{i}') as f:
|
||||
with open(f'hitler_rede_{i}') as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
hitler_words.extend(get_words_from_line(line))
|
||||
|
||||
with open(f'hitler_texts/goebbels_sportpalast') as f:
|
||||
with open(f'goebbels_sportpalast') as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
hitler_words.extend(get_words_from_line(line))
|
||||
|
||||
with open(f'hitler_texts/mein_kampf') as f:
|
||||
with open(f'mein_kampf') as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
hitler_words.extend(get_words_from_line(line))
|
||||
@@ -47,6 +47,6 @@ with open("german_words", "w") as f:
|
||||
f.write(word)
|
||||
|
||||
with open("hitler_words", "w") as f:
|
||||
for word in hitler_words:
|
||||
for word in only_hitler_words:
|
||||
word += "\n"
|
||||
f.write(word)
|
||||
Reference in New Issue
Block a user