Add recursion to collocationAnalysis
Change-Id: Ied5ab55f31f34048552ec0f0789b0b0175b2e4e0
diff --git a/demo/Rmd/ca.Rmd b/demo/Rmd/ca.Rmd
new file mode 100644
index 0000000..4e530e8
--- /dev/null
+++ b/demo/Rmd/ca.Rmd
@@ -0,0 +1,44 @@
+---
+title: "Kookkurrenzanalyse zu aufmerksam"
+output:
+ html_document:
+ css: style.css
+ keep_md: yes
+---
+
+```{r setup, include=FALSE}
+knitr::opts_chunk$set(echo = FALSE, warnings = FALSE)
+library(RKorAPClient)
+library(kableExtra)
+library(DT)
+library(tidyverse)
+kco <- new("KorAPConnection", verbose=T)
+if (!exists('ca')) {
+ca <- kco %>%
+ collocationAnalysis(
+ "aufmerksam",
+ leftContextSize = 2,
+ rightContextSize = 2,
+ exactFrequencies = TRUE,
+ searchHitsSampleLimit = 1000,
+ topCollocatesLimit = 10,
+ withinSpan = "",
+ maxRecurse=1
+ )
+}
+```
+
+```{r ca}
+ca %>%
+ mutate(Beispiel=sprintf('<a href="%s">%s</a>', webUIRequestUrl, example)) %>%
+ select(Beispiel, logDice, pmi, ll) %>%
+ head(50) %>%
+ datatable(escape = F,
+ extensions = c('Buttons'),
+ options = list(
+ buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
+ pageLength = 25,
+ dom = 'ftpB'
+ )) %>%
+ formatRound(columns=~logDice + pmi + ll,digits=2)
+```
diff --git a/demo/Rmd/style.css b/demo/Rmd/style.css
new file mode 100644
index 0000000..93df502
--- /dev/null
+++ b/demo/Rmd/style.css
@@ -0,0 +1,50 @@
+@import url('//code.cdn.mozilla.net/fonts/fira.css');
+@import url('//korap.ids-mannheim.de/font/libertinus.css');
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: 'Fira Sans',sans-serif;
+ line-height: 1.2;
+ font-weight: 500;
+}
+
+.title, .subtitle {
+ text-transform: uppercase;
+ text-align: center;
+}
+
+.date, .author {
+ text-align: center;
+}
+
+body {
+ font-family: 'Fira Sans', sans-serif;
+ font-size: 18px;
+ font-weight: 400;
+ font-variant-ligatures: common-ligatures;
+}
+
+
+
+p {
+ hyphens: auto;
+ text-align: justify;
+ overflow-wrap: break-word;
+}
+
+.footnotes {
+ font-family: 'Fira Sans Condensed', sans-serif;
+ font-weight: 400;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+#TOC > ul {
+ font-family: 'Fira Sans', sans-serif;
+}
+
+.caption {
+ font-family: 'Fira Sans Condensed', sans-serif;
+ font-weight: 400;
+ font-size: 16px;
+ text-align: center;
+}