diff --git a/R/repair.R b/R/repair.R index b079f37..53ff264 100644 --- a/R/repair.R +++ b/R/repair.R @@ -88,5 +88,8 @@ repair_comments <- function(comments, redner) { repair <- function(parse_output) { list(redner = repair_redner(parse_output$redner), reden = repair_reden(parse_output$reden), - talks = repair_talks(parse_output$talks)) + talks = repair_talks(parse_output$talks), + #comments = repair_comments(parse_output$comments) + comments = parse_output$comments + ) } diff --git a/hitler_texts/parse.py b/hitler_texts/parse.py new file mode 100644 index 0000000..feceba6 --- /dev/null +++ b/hitler_texts/parse.py @@ -0,0 +1,8 @@ +import os +words = [] +for i in range(1, 7): + with open(f'hitler_rede_{i}') as f: + lines = f.readlines() + for line in lines: + words.extend(line.split(sep=" ")) +