소스 검색

fix repair

genderequality-alternative
JosuaKugler 4 년 전
부모
커밋
ac8e55e58a
3개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. +4
    -1
      R/repair.R
  2. +8
    -0
      hitler_texts/parse.py
  3. +1
    -0
      vignettes/funwithdata.Rmd

+ 4
- 1
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
)
}

+ 8
- 0
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=" "))

+ 1
- 0
vignettes/funwithdata.Rmd 파일 보기

@@ -57,3 +57,4 @@ left_join(reden, redner, by=c("redner" = "id")) %>%
ggplot(aes(x = fraktion, y = n)) +
geom_bar(stat = "identity")
```


불러오는 중...
취소
저장