| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 1 | --- |
| Marc Kupietz | df0eda9 | 2023-10-07 20:50:00 +0200 | [diff] [blame] | 2 | title: "IDS theme for revealjs" |
| 3 | subtitle: "a demo" |
| Marc Kupietz | ea8ff77 | 2024-05-14 22:08:46 +0200 | [diff] [blame] | 4 | author: |
| 5 | - name: Marc Kupietz |
| 6 | - name: John Doe |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 7 | institute: "IDS Mannheim" |
| Marc Kupietz | 7df5e69 | 2023-10-10 21:49:17 +0200 | [diff] [blame] | 8 | date: "`r paste0('Mannheim, ', Sys.Date())`" |
| Marc Kupietz | b2cc523 | 2026-08-29 16:21:52 +0300 | [diff] [blame] | 9 | website: "https://gitlab.ids-mannheim.de/ids/revealjs" |
| Marc Kupietz | 59e95a6 | 2026-08-29 10:19:05 +0300 | [diff] [blame] | 10 | partner_logo: "logos/clarin-logo.svg" |
| 11 | funder_logo: "logos/text-plus-logo.svg" |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 12 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 13 | revealjs.ids::revealjs_presentation: |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 14 | reveal_plugins: |
| 15 | - search |
| 16 | - zoom |
| 17 | - notes |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 18 | - menu |
| 19 | reveal_options: |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 20 | chalkboard: |
| 21 | theme: chalkboard |
| 22 | toggleNotesButton: true |
| 23 | menu: |
| 24 | numbers: true |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 25 | lang: en |
| 26 | bibliography: references.bib |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 27 | --- |
| 28 | |
| 29 | ```{r setup, include=FALSE} |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 30 | knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE) |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 31 | library(idsThemeR) |
| Marc Kupietz | 289f997 | 2023-10-09 09:49:12 +0200 | [diff] [blame] | 32 | library(RKorAPClient) |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 33 | library(highcharter) |
| 34 | library(tidyverse) |
| Marc Kupietz | 9535aed | 2026-08-28 14:03:21 +0300 | [diff] [blame] | 35 | library(DT) |
| 36 | #source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R") |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 37 | ``` |
| Marc Kupietz | b2cc523 | 2026-08-29 16:21:52 +0300 | [diff] [blame] | 38 | ## Overview |
| 39 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 40 | # Introduction |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 41 | |
| 42 | ## R Markdown |
| 43 | |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 44 | This 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 Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 45 | |
| 46 | When 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. |
| 47 | |
| 48 | ## Slide with Bullets |
| 49 | ### Subheading |
| 50 | |
| 51 | - Bullet 1 |
| 52 | - Bullet 2 |
| Marc Kupietz | 281ba9c | 2026-08-11 15:37:48 +0200 | [diff] [blame] | 53 | - Second-level bullet |
| 54 | - Second-level bullet |
| 55 | - Third-level bullet |
| 56 | - Third-level bullet |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 57 | - Bullet 3 |
| 58 | |
| 59 | <aside class="notes"> |
| 60 | Here are some notes. |
| 61 | </aside> |
| 62 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 63 | # Methods |
| 64 | |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 65 | ## Slide with R Output |
| 66 | |
| 67 | ```{r cars, echo = TRUE} |
| 68 | summary(cars) |
| 69 | ``` |
| 70 | |
| 71 | ## Slide with Plot |
| 72 | |
| Marc Kupietz | beefb62 | 2026-08-08 17:17:07 +0200 | [diff] [blame] | 73 | ```{r pressure, fig.height=5, fig.width=12, message=F, warning=F} |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 74 | plot(pressure) |
| 75 | ``` |
| 76 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 77 | # Results |
| 78 | |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 79 | ## Registered Users |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 80 | ### for COSMAS II and KorAP |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 81 | |
| 82 | ```{r registrations, message=F, warning=F} |
| 83 | registrierungen <- |
| 84 | read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>% |
| 85 | add_column(group = "registered users") |
| 86 | |
| Marc Kupietz | beefb62 | 2026-08-08 17:17:07 +0200 | [diff] [blame] | 87 | hc <- registrierungen %>% |
| 88 | hchart("line", hcaes(x = date, y = registered, group = group)) %>% |
| 89 | hc_add_theme(hc_theme_ids_light()) %>% |
| 90 | hc_yAxis(title = list(text = "")) %>% |
| 91 | hc_xAxis(title = list(text = "")) %>% |
| 92 | hc_legend(element_blank()) %>% |
| Marc Kupietz | 65e231f | 2026-08-28 09:19:18 +0300 | [diff] [blame] | 93 | hc_size(height = 500, width = 1160) |
| Marc Kupietz | beefb62 | 2026-08-08 17:17:07 +0200 | [diff] [blame] | 94 | hc |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 95 | ``` |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 96 | |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 97 | |
| Marc Kupietz | 9535aed | 2026-08-28 14:03:21 +0300 | [diff] [blame] | 98 | ## Adjective Collocates |
| 99 | ### of *Sockenpuppe* in the German Wikipedia Talk Corpus [@kupietz_wikipedia_talk_2026] |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 100 | |
| Marc Kupietz | 9535aed | 2026-08-28 14:03:21 +0300 | [diff] [blame] | 101 | ```{r ca, message=F, warning=F, escape=F} |
| 102 | library(RKorAPClient) |
| 103 | KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |> |
| 104 | collocationAnalysis( |
| 105 | "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})", |
| 106 | leftContextSize = 1, |
| 107 | rightContextSize = 0, |
| 108 | cacheAs = "sockenpuppe_aca.rds" |
| 109 | ) |> |
| 110 | mutate(collocate = sprintf("[%s](%s)", collocate, webUIRequestUrl), |
| 111 | across(where(is.numeric), ~ round(.x, 2))) |> |
| 112 | select(collocate, logDice, pmi, ll) |> |
| 113 | head(8) |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 114 | ``` |
| Marc Kupietz | 21f526c | 2026-08-14 12:32:56 +0200 | [diff] [blame] | 115 | |
| Marc Kupietz | 9535aed | 2026-08-28 14:03:21 +0300 | [diff] [blame] | 116 | |
| 117 | ## Complete Source Code |
| 118 | ### of the previous slide's collocation analysis |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 119 | |
| 120 | ```R |
| Marc Kupietz | 9535aed | 2026-08-28 14:03:21 +0300 | [diff] [blame] | 121 | library(RKorAPClient) |
| 122 | KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |> |
| 123 | collocationAnalysis( |
| 124 | "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})", |
| 125 | leftContextSize = 1, |
| 126 | rightContextSize = 0, |
| 127 | cacheAs = "sockenpuppe_aca.rds" |
| 128 | ) |> |
| 129 | mutate(collocate = sprintf("[%s](%s)", collocate, webUIRequestUrl), |
| 130 | across(where(is.numeric), ~ round(.x, 2))) |> |
| 131 | select(collocate, logDice, pmi, ll) |> |
| 132 | head(8) |
| 133 | ``` |
| 134 | <small>Using RKorAPClient [@kupietz_rkorapclient_2020;@kupietz_building_2022]</small> |
| 135 | |
| Marc Kupietz | 6640f12 | 2026-08-28 14:46:09 +0300 | [diff] [blame] | 136 | ## Adjective Collocates (DataTable) |
| 137 | ### of *Sockenpuppe* in the German Wikipedia Talk Corpus [@kupietz_wikipedia_talk_2026] |
| Marc Kupietz | 9535aed | 2026-08-28 14:03:21 +0300 | [diff] [blame] | 138 | |
| 139 | ```{r cadt, message=F, warning=F, escape=F} |
| 140 | library(RKorAPClient) |
| 141 | KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |> |
| 142 | collocationAnalysis( |
| 143 | "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})", |
| 144 | leftContextSize = 1, |
| 145 | rightContextSize = 0, |
| 146 | cacheAs = "sockenpuppe_aca.rds" |
| 147 | ) |> |
| 148 | head(8) |> |
| 149 | mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) |> |
| 150 | select(Collocate, logDice, pmi, ll) |> |
| 151 | datatable(escape=F) |> |
| 152 | formatRound(columns=~logDice + pmi + ll, digits=2) |
| 153 | ``` |
| 154 | |
| 155 | ## Source Code |
| 156 | ### Display Collocation Analysis Result as DataTable |
| 157 | |
| 158 | ```R |
| 159 | library(RKorAPClient) |
| 160 | KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |> |
| 161 | collocationAnalysis( |
| 162 | "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})", |
| 163 | leftContextSize = 1, |
| 164 | rightContextSize = 0, |
| 165 | cacheAs = "sockenpuppe_aca.rds" |
| 166 | ) |> |
| 167 | head(8) |> |
| 168 | mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) |> |
| 169 | select(Collocate, logDice, pmi, ll) |> |
| 170 | datatable(escape=F) |> |
| 171 | formatRound(columns=~logDice + pmi + ll, digits=2) |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 172 | ``` |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 173 | # References |
| 174 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 175 | ## References |
| 176 | |