Marc Kupietz | 898515a | 2023-05-10 15:21:38 +0200 | [diff] [blame] | 1 | library(RKorAPClient) |
| 2 | library(httr2) |
| 3 | library(kableExtra) |
| 4 | |
| 5 | token <- 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 | |
| 10 | new("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() |