| Marc Kupietz | e7d2e8d | 2026-04-20 17:15:44 +0200 | [diff] [blame^] | 1 | library(RKorAPClient) |
| 2 | library(tidyverse) |
| 3 | library(urltools) |
| 4 | VC = "" # no virtual corpus, i.e. all texts |
| 5 | deliko <- KorAPConnection("https://korap.dnb.de", verbose = TRUE) |
| 6 | query <- corpusQuery( |
| 7 | deliko, |
| 8 | "<base/s=t>", |
| 9 | # this finds each text once |
| 10 | vc = VC, |
| 11 | fields = c( |
| 12 | "textSigle", |
| 13 | "title", |
| 14 | "subTitle", |
| 15 | "author", |
| 16 | "textType", |
| 17 | "textTypeRef", |
| 18 | "publisher", |
| 19 | "pubDate", |
| 20 | "pubPlace", |
| 21 | "ISBN", |
| 22 | "URN", |
| 23 | "award" |
| 24 | ) |
| 25 | ) %>% |
| 26 | fetchAll() |
| 27 | |
| 28 | df <- query@collectedMatches %>% |
| 29 | mutate(publisher = str_replace_all(publisher, "data:,", ""), |
| 30 | URN = URLdecode(str_replace_all(URN, ".*,", ""))) %>% |
| 31 | select(-c("matchStart", "matchEnd")) |
| 32 | |
| 33 | write_tsv(df, "deliko_metadata.tsv") |