Merge branch 'romanze' into 'master'
Resolves #5
diff --git a/shiny/app.R b/shiny/app.R
index ca4b940..2bce6dc 100644
--- a/shiny/app.R
+++ b/shiny/app.R
@@ -167,7 +167,8 @@
corpus <- vcFromString(input$cq)
texttypes <-
- c("/[^:]*[Zz]eitung.*/", "/(Zeitschrift|Magazin).*/", "/Agenturmeldung.*/", "/Enzyklopädie.*/", "/.*Diskussion.*/", "/.*[Rr]oman([^z]|$)/", "/Newsgroup.*/", "/Tagebuch.*/", "/.*Sachbuch.*/")
+ c("/[^:]*[Zz]eitung.*/", "/(Zeitschrift|Magazin).*/", "/Agenturmeldung.*/", "/Enzyklopädie.*/", "/.*Diskussion.*/",
+ "/.*[Rr]oman([^z].*)?/", "/Newsgroup.*/", "/Tagebuch.*/", "/.*Sachbuch.*/")
df <- expand_grid(corpus=corpus, texttype=texttypes) %>%
mutate(vc = sprintf("%stextType=%s", corpus, texttype)) %>%
@@ -178,7 +179,11 @@
hc_add_series(type = "bar", data = df, hcaes(texttype, tokens, group=corpus)) %>%
hc_xAxis(categories = df$texttype %>%
str_replace_all("Zz", "Z") %>%
- str_replace_all("[/.*)():^\\[\\]]", "") %>% str_replace_all("\\|", "/")) %>%
+ str_replace_all("Rr", "R") %>%
+ str_replace_all("Bb", "B") %>%
+ str_replace_all("z]", "") %>%
+ str_replace_all("[/.*)():^\\[\\]\\?]", "") %>%
+ str_replace_all("\\|", "/")) %>%
hc_title(text="Texttyp")
hc
})