| --- |
| title: "IDS theme for revealjs" |
| subtitle: "a demo" |
| author: |
| - name: Marc Kupietz |
| - name: John Doe |
| institute: "IDS Mannheim" |
| date: "`r paste0('Mannheim, ', Sys.Date())`" |
| output: |
| revealjs::revealjs_presentation: |
| reveal_plugins: |
| - search |
| - zoom |
| - notes |
| - menu |
| reveal_options: |
| chalkboard: |
| theme: chalkboard |
| toggleNotesButton: true |
| menu: |
| numbers: true |
| lang: en |
| bibliography: references.bib |
| csl: "https://raw.githubusercontent.com/ICLC-10/Zotero/master/styles/ICLC-10.csl" |
| --- |
| |
| ```{r setup, include=FALSE} |
| knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE) |
| library(idsThemeR) |
| library(RKorAPClient) |
| library(highcharter) |
| library(tidyverse) |
| source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R") |
| ``` |
| # Introduction |
| |
| ## R Markdown |
| |
| 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>. |
| |
| 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. |
| |
| ## Slide with Bullets |
| ### Subheading |
| |
| - Bullet 1 |
| - Bullet 2 |
| - Bullet 3 |
| |
| <aside class="notes"> |
| Here are some notes. |
| </aside> |
| |
| # Methods |
| |
| ## Slide with R Output |
| |
| ```{r cars, echo = TRUE} |
| summary(cars) |
| ``` |
| |
| ## Slide with Plot |
| |
| ```{r pressure} |
| plot(pressure) |
| ``` |
| |
| # Results |
| |
| ## Registered Users |
| ### for COSMAS II and KorAP |
| |
| ```{r registrations, message=F, warning=F} |
| registrierungen <- |
| read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>% |
| add_column(group = "registered users") |
| |
| hc <- registrierungen %>% |
| hchart("line", hcaes(x=date, y=registered, group=group)) %>% |
| hc_add_theme(hc_theme_ids_light()) %>% |
| hc_yAxis(title=list(text="")) %>% |
| hc_xAxis(title=list(text="")) %>% |
| hc_legend(element_blank()) %>% |
| hc_size(height=500, width=1260) |
| hc |
| |
| ``` |
| |
| ## Light Verb Constructions |
| ### with *take* in ICC-English |
| |
| ```{r take-icc, fig.cap="Collocation analysis results for *take* + NOUN in [ICC-ENG](https://korap.ids-mannheim.de/instance/icc), using the RKorAPClient [@kupietz_rkorapclient_2020] package."} |
| take_ca_icc <- |
| collocationAnalysis( |
| icc_con("eng"), |
| "focus({[ud/l=take]} [ud/p=NOUN])", |
| leftContextSize = 0, |
| rightContextSize = 1, |
| minOccur = 2, |
| addExamples = T |
| ) %>% head(7) |
| |
| take_ca_icc %>% show_table() |
| ``` |
| |
| ## Source Code |
| ### Collocation Analysis |
| |
| ```R |
| df <- collocationAnalysis( |
| icc_con("eng"), |
| "focus({[ud/l=take]} [ud/p=NOUN])", |
| leftContextSize = 0, |
| rightContextSize = 1, |
| minOccur = 2, |
| addExamples = T |
| ) |
| ``` |
| |
| ## Source Code |
| ### Print Collocation Analysis as DataTable |
| |
| ```R |
| df %>% |
| mutate(Collocate=sprintf('<a href="%s">%s</a>', |
| webUIRequestUrl, collocate)) %>% |
| mutate(example=str_replace(example, |
| ".*(\\W+\\w+\\W+\\w+\\W+<mark.*/mark>.*)", "\\1")) %>% |
| mutate(example=str_replace(example, |
| "(.*<mark.*/mark>\\W+\\w+\\W+\\w+).*", "\\1")) %>% |
| rowwise() %>% |
| select(Collocate, Example, logDice, pmi, ll) %>% |
| datatable(escape = F) %>% |
| formatRound(columns=~logDice + pmi + ll, digits=2) |
| ``` |
| # References |
| |
| ## References |
| |