blob: b67564e1a04f4401cc0b167d30edc2821d0aa1c7 [file] [log] [blame]
Marc Kupietz898515a2023-05-10 15:21:38 +02001library(RKorAPClient)
2library(httr2)
3library(kableExtra)
4
5token <- oauth_client( id = "773NHGM76N7P9b6rLfmpM4",
6 token_url = "https://korap.ids-mannheim.de/api/v1.0/oauth2/token") %>%
7 oauth_flow_auth_code( scope = "search match_info",
8 auth_url = "https://korap.ids-mannheim.de/settings/oauth/authorize")
9
10new("KorAPConnection", verbose = TRUE, accessToken = token$access_token) %>%
11 collocationAnalysis("focus([marmot/p=ADJA] {Gendern})", leftContextSize=1, rightContextSize=0) %>%
12 mutate(collocate = paste0('<a href="', webUIRequestUrl, '">', collocate, '</a>')) %>%
13 select(collocate, O, pmi, mi2, mi3, logDice, ll) %>%
14 kable(escape = FALSE, caption = "Adjective collocates of 'Gendern'") %>% kable_styling()