blob: ae0a947c9e52e5c2b9558e6e00543e7c44112968 [file] [log] [blame]
Marc Kupietze7d2e8d2026-04-20 17:15:44 +02001library(RKorAPClient)
2library(tidyverse)
3library(urltools)
4VC = "" # no virtual corpus, i.e. all texts
5deliko <- KorAPConnection("https://korap.dnb.de", verbose = TRUE)
6query <- 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
28df <- query@collectedMatches %>%
29 mutate(publisher = str_replace_all(publisher, "data:,", ""),
30 URN = URLdecode(str_replace_all(URN, ".*,", ""))) %>%
31 select(-c("matchStart", "matchEnd"))
32
33write_tsv(df, "deliko_metadata.tsv")