Przeglądaj źródła

merge from remote

genderequality-alternative
flavis 4 lat temu
rodzic
commit
e8cf7f0e4b
2 zmienionych plików z 12 dodań i 1 usunięć
  1. +4
    -1
      R/repair.R
  2. +8
    -0
      hitler_texts/parse.py

+ 4
- 1
R/repair.R Wyświetl plik

@@ -88,5 +88,8 @@ repair_comments <- function(comments, redner) {
repair <- function(parse_output) { repair <- function(parse_output) {
list(redner = repair_redner(parse_output$redner), list(redner = repair_redner(parse_output$redner),
reden = repair_reden(parse_output$reden), 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
)
} }

+ 8
- 0
hitler_texts/parse.py Wyświetl plik

@@ -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=" "))

Ładowanie…
Anuluj
Zapisz