blob: 0f2d10488413d323a95b5b8678cbe10a5fbf4fca [file] [log] [blame]
library(RKorAPClient)
library(tidyverse)
library(knitr)
library(rmarkdown)
nodeWordform <- 'aufmerksam'
mdFile <- tempfile(nodeWordform, fileext = ".md")
new("KorAPConnection", verbose = TRUE) %>%
collocationAnalysis(
nodeWordform,
leftContextSize = 2,
rightContextSize = 2,
exactFrequencies = TRUE,
searchHitsSampleLimit = 1000,
topCollocatesLimit = 10,
maxRecurse = 1,
addExamples = TRUE
) %>%
mutate(LVC = sprintf("[%s](%s)", example, webUIRequestUrl)) %>%
{ . ->> ca } %>%
select(LVC, logDice, pmi, ll) %>%
head(50) %>%
kable(format = "pipe", digits = 2) %>%
cat(file = mdFile, sep = "\n")
rmarkdown::render(mdFile)
browseURL(gsub("\\.md", ".html", mdFile))