blob: 48041150c2a9b19b486c2f6301398893c33283b2 [file] [log] [blame]
---
title: "ICC Written Launch"
output:
html_document:
css: style.css
self_contained: yes
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE, echo=FALSE, warning=FALSE}
knitr::opts_chunk$set(echo = FALSE, warnings = FALSE)
source("common.R")
```
# Actual composition of ICC parts
## Composition by ICC genre
```{r composition_by_genre, message = FALSE}
icc_genre <- icc %>%
expand_grid(genre) %>%
mutate(vc = paste0("iccGenre=", genre)) %>%
rowwise() %>%
mutate(tokens= corpusStats(icc_con(lang, token), vc = vc)@tokens)
icc_genre %>% ggplot(aes(x=lang, fill=genre, y=tokens)) +
geom_col() + scale_y_continuous(labels = label_number(scale_cut = cut_short_scale())) +
theme_ids() +
scale_fill_ids() +
geom_text(aes(label=if_else(tokens > 0, as.character(tokens), ""), y=tokens), position= position_stack(reverse = F, vjust = 0.5), color="black", size=3.2, family="Fira Sans Condensed")
```
## Composition by date of publication
```{r composition_by_pubdate, message=F, warning=F}
year <- c(1986:2023)
icc_year <- icc %>%
expand_grid(year) %>%
mutate(vc = paste0("pubDate in ", year)) %>%
rowwise() %>%
mutate(tokens= corpusStats(icc_con(lang, token), vc = vc)@tokens)
icc_year %>% ggplot(aes(x=year, fill=lang, color=lang, y=tokens)) +
# geom_smooth(se=F, span=0.25) +
xlim(1990, 2023) +
ylim(0, NA) +
stat_smooth(
geom = 'area', method = 'loess', span = 1/4,
alpha = 0.1) +
# geom_area(alpha=0.1, position = "identity") +
scale_fill_ids() + scale_colour_ids() +
scale_y_continuous(labels = label_number(scale_cut = cut_short_scale())) +
theme_ids()
```
## Part-of-Speech proportions
```{r pos_proportions}
POS_tag <- c(
"ADJ", "ADP",# "PUNCT",
"ADV", "AUX", # "SYM",
# "INTJ",
"CCONJ", # "X",
"NOUN", "DET",
"PROPN", #"NUM",
"VERB", #"PART",
"PRON",
"SCONJ"
)
icc_by_pos_tag <- icc %>% expand_grid(POS = POS_tag) %>%
rowwise() %>%
mutate(f = frequencyQuery(icc_con(lang), sprintf("[ud/p=%s]", POS))$f)
icc_by_pos_tag %>% ggplot(aes(x=lang, fill = POS, y=f)) +
geom_col() + scale_y_continuous(labels = label_number(scale_cut = cut_short_scale())) +
scale_fill_ids() + scale_color_ids() +
theme_ids(base_size = 12) +
geom_text(aes(label=sprintf("%.2f%%", 100*f), y=f), position= position_stack(reverse = F, vjust = 0.5), color="black", size=3.2, family="Fira Sans Condensed")
```
# Pilot study: Identification of Light Verb Constructions with *take*
```{r prepare_ca, output=FALSE, message=FALSE}
```
## English: *take*
```{r take_icc, echo=TRUE, message=FALSE}
take_ca_icc <-
collocationAnalysis(
icc_con("eng"),
"focus({[ud/l=take]} [ud/p=NOUN])",
leftContextSize = 0,
rightContextSize = 1,
minOccur = 2,
addExamples = T
)
take_ca_icc %>% show_table()
```
### For comparison based on English Wikipedia
#### (Snapshot from 2015 with 2.4 billion words, see [here](https://www.ids-mannheim.de/digspra/kl/projekte/korpora/verfuegbarkeit/))
```{r take_wpe, echo=TRUE}
if (file.exists("../data/take_ca_wpe")) {
take_ca_wpe_i <- readRDS("../data/take_ca_wpe")
} else {
wpe <- new("KorAPConnection", "https://korap.ids-mannheim.de/instance/english", verbose=T)
take_ca_wpe_i <-
collocationAnalysis(
wpe,
"focus({[tt/l=take]} [tt/p=NN])",
leftContextSize = 0,
rightContextSize = 1,
ignoreCollocateCase = TRUE,
minOccur = 5,
addExamples = T
)
}
take_ca_wpe_i %>% show_table(max=10000)
```
## German: *nehmen*
```{r nehmen_icc, echo=TRUE}
nehmen_ca_icc <-
collocationAnalysis(
icc_con("ger"),
"focus([tt/p=NN] {[tt/l=nehmen]})",
leftContextSize = 1,
rightContextSize = 0,
minOccur = 2,
addExamples = T
)
nehmen_ca_icc %>% show_table()
```
### For comparison based on the whole DeReKo
```{r nehmen_dereko}
nehmen_ca_dereko <- readRDS("../data/ca_nehmen_dereko_examples")
nehmen_ca_dereko %>% show__full_table()
```
## Norwegian: *ta*
```{r ta_icc, echo=T, message=FALSE}
ta_ca_icc <-
collocationAnalysis(
icc_con("nor"),
"focus({[ud/l=ta]} [ud/p=NOUN])",
leftContextSize = 0,
rightContextSize = 1,
minOccur = 2,
addExamples = T
)
ta_ca_icc %>% show_table()
```