blob: d657904ff2687653abbb9eb95e31e94597649021 [file] [log] [blame]
Marc Kupietza737b1b2023-10-07 09:32:20 +02001---
Marc Kupietzdf0eda92023-10-07 20:50:00 +02002title: "IDS theme for revealjs"
3subtitle: "a demo"
Marc Kupietzea8ff772024-05-14 22:08:46 +02004author:
5 - name: Marc Kupietz
6 - name: John Doe
Marc Kupietza737b1b2023-10-07 09:32:20 +02007institute: "IDS Mannheim"
Marc Kupietz7df5e692023-10-10 21:49:17 +02008date: "`r paste0('Mannheim, ', Sys.Date())`"
Marc Kupietz59e95a62026-08-29 10:19:05 +03009website: "https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/revealjs"
10partner_logo: "logos/clarin-logo.svg"
11funder_logo: "logos/text-plus-logo.svg"
Marc Kupietza737b1b2023-10-07 09:32:20 +020012output:
Marc Kupietze195cea2026-08-17 13:17:33 +020013 revealjs.ids::revealjs_presentation:
Marc Kupietza737b1b2023-10-07 09:32:20 +020014 reveal_plugins:
15 - search
16 - zoom
17 - notes
Marc Kupietza737b1b2023-10-07 09:32:20 +020018 - menu
19 reveal_options:
Marc Kupietza737b1b2023-10-07 09:32:20 +020020 chalkboard:
21 theme: chalkboard
22 toggleNotesButton: true
23 menu:
24 numbers: true
Marc Kupietz3b217192023-10-08 20:56:36 +020025lang: en
26bibliography: references.bib
Marc Kupietza737b1b2023-10-07 09:32:20 +020027---
28
29```{r setup, include=FALSE}
Marc Kupietz3b217192023-10-08 20:56:36 +020030knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
Marc Kupietz2c094622023-10-08 14:19:47 +020031library(idsThemeR)
Marc Kupietz289f9972023-10-09 09:49:12 +020032library(RKorAPClient)
Marc Kupietz2c094622023-10-08 14:19:47 +020033library(highcharter)
34library(tidyverse)
Marc Kupietz9535aed2026-08-28 14:03:21 +030035library(DT)
36#source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R")
Marc Kupietza737b1b2023-10-07 09:32:20 +020037```
Marc Kupietz51152512023-10-09 23:18:10 +020038# Introduction
Marc Kupietza737b1b2023-10-07 09:32:20 +020039
40## R Markdown
41
Marc Kupietz3b217192023-10-08 20:56:36 +020042This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown [@R-rmarkdown] see <http://rmarkdown.rstudio.com>.
Marc Kupietza737b1b2023-10-07 09:32:20 +020043
44When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
45
46## Slide with Bullets
47### Subheading
48
49- Bullet 1
50- Bullet 2
Marc Kupietz281ba9c2026-08-11 15:37:48 +020051 - Second-level bullet
52 - Second-level bullet
53 - Third-level bullet
54 - Third-level bullet
Marc Kupietza737b1b2023-10-07 09:32:20 +020055- Bullet 3
56
57<aside class="notes">
58Here are some notes.
59</aside>
60
Marc Kupietz51152512023-10-09 23:18:10 +020061# Methods
62
Marc Kupietza737b1b2023-10-07 09:32:20 +020063## Slide with R Output
64
65```{r cars, echo = TRUE}
66summary(cars)
67```
68
69## Slide with Plot
70
Marc Kupietzbeefb622026-08-08 17:17:07 +020071```{r pressure, fig.height=5, fig.width=12, message=F, warning=F}
Marc Kupietza737b1b2023-10-07 09:32:20 +020072plot(pressure)
73```
74
Marc Kupietz51152512023-10-09 23:18:10 +020075# Results
76
Marc Kupietz2c094622023-10-08 14:19:47 +020077## Registered Users
Marc Kupietz51152512023-10-09 23:18:10 +020078### for COSMAS II and KorAP
Marc Kupietz2c094622023-10-08 14:19:47 +020079
80```{r registrations, message=F, warning=F}
81registrierungen <-
82 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
83 add_column(group = "registered users")
84
Marc Kupietzbeefb622026-08-08 17:17:07 +020085hc <- registrierungen %>%
86 hchart("line", hcaes(x = date, y = registered, group = group)) %>%
87 hc_add_theme(hc_theme_ids_light()) %>%
88 hc_yAxis(title = list(text = "")) %>%
89 hc_xAxis(title = list(text = "")) %>%
90 hc_legend(element_blank()) %>%
Marc Kupietz65e231f2026-08-28 09:19:18 +030091 hc_size(height = 500, width = 1160)
Marc Kupietzbeefb622026-08-08 17:17:07 +020092hc
Marc Kupietz2c094622023-10-08 14:19:47 +020093```
Marc Kupietzcf383442023-10-08 22:50:19 +020094
Marc Kupietzcf383442023-10-08 22:50:19 +020095
Marc Kupietz9535aed2026-08-28 14:03:21 +030096## Adjective Collocates
97### of *Sockenpuppe* in the German Wikipedia Talk Corpus [@kupietz_wikipedia_talk_2026]
Marc Kupietzcf383442023-10-08 22:50:19 +020098
Marc Kupietz9535aed2026-08-28 14:03:21 +030099```{r ca, message=F, warning=F, escape=F}
100library(RKorAPClient)
101KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
102 collocationAnalysis(
103 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
104 leftContextSize = 1,
105 rightContextSize = 0,
106 cacheAs = "sockenpuppe_aca.rds"
107) |>
108mutate(collocate = sprintf("[%s](%s)", collocate, webUIRequestUrl),
109 across(where(is.numeric), ~ round(.x, 2))) |>
110select(collocate, logDice, pmi, ll) |>
111head(8)
Marc Kupietzcf383442023-10-08 22:50:19 +0200112```
Marc Kupietz21f526c2026-08-14 12:32:56 +0200113
Marc Kupietz9535aed2026-08-28 14:03:21 +0300114
115## Complete Source Code
116### of the previous slide's collocation analysis
Marc Kupietzcf383442023-10-08 22:50:19 +0200117
118```R
Marc Kupietz9535aed2026-08-28 14:03:21 +0300119library(RKorAPClient)
120KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
121 collocationAnalysis(
122 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
123 leftContextSize = 1,
124 rightContextSize = 0,
125 cacheAs = "sockenpuppe_aca.rds"
126) |>
127mutate(collocate = sprintf("[%s](%s)", collocate, webUIRequestUrl),
128 across(where(is.numeric), ~ round(.x, 2))) |>
129select(collocate, logDice, pmi, ll) |>
130head(8)
131```
132<small>Using RKorAPClient [@kupietz_rkorapclient_2020;@kupietz_building_2022]</small>
133
Marc Kupietz6640f122026-08-28 14:46:09 +0300134## Adjective Collocates (DataTable)
135### of *Sockenpuppe* in the German Wikipedia Talk Corpus [@kupietz_wikipedia_talk_2026]
Marc Kupietz9535aed2026-08-28 14:03:21 +0300136
137```{r cadt, message=F, warning=F, escape=F}
138library(RKorAPClient)
139KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
140 collocationAnalysis(
141 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
142 leftContextSize = 1,
143 rightContextSize = 0,
144 cacheAs = "sockenpuppe_aca.rds"
145) |>
146head(8) |>
147mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) |>
148select(Collocate, logDice, pmi, ll) |>
149datatable(escape=F) |>
150formatRound(columns=~logDice + pmi + ll, digits=2)
151```
152
153## Source Code
154### Display Collocation Analysis Result as DataTable
155
156```R
157library(RKorAPClient)
158KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
159 collocationAnalysis(
160 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
161 leftContextSize = 1,
162 rightContextSize = 0,
163 cacheAs = "sockenpuppe_aca.rds"
164) |>
165head(8) |>
166mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) |>
167select(Collocate, logDice, pmi, ll) |>
168datatable(escape=F) |>
169formatRound(columns=~logDice + pmi + ll, digits=2)
Marc Kupietzcf383442023-10-08 22:50:19 +0200170```
Marc Kupietz3b217192023-10-08 20:56:36 +0200171# References
172
Marc Kupietz51152512023-10-09 23:18:10 +0200173## References
174