blob: b121c4913d4af0f00094da2d4015e8b6b20ae7a5 [file] [log] [blame]
Marc Kupietz5a336b62021-11-27 17:51:35 +01001library(RKorAPClient)
2library(tidyverse)
3library(knitr)
4new("KorAPConnection", verbose = TRUE) %>%
5 collocationAnalysis(
6 "aufmerksam",
7 leftContextSize = 2,
8 rightContextSize = 2,
9 exactFrequencies = TRUE,
10 searchHitsSampleLimit = 1000,
11 topCollocatesLimit = 10,
12# withinSpan = "",
13 maxRecurse = 1,
14 addExamples = T
15 ) %>%
16# mutate(LVC = sprintf("[aufmerksam %s](%s)", collocate, webUIRequestUrl)) %>%
17 { . ->> cax } %>%
18 mutate(LVC = sprintf("[%s](%s)", example, webUIRequestUrl)) %>%
19 { . ->> ca } %>%
20 select(LVC, logDice, pmi, ll) %>%
21 head(50) %>%
22 kable(format="pipe", digits=2) %>%
23 cat(file="/tmp/aufmerksam.md", sep="\n")
24
25rmarkdown::render("/tmp/aufmerksam.md")
26browseURL("/tmp/aufmerksam.html")