| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/textMetadata.R |
| 3 | \name{textMetadata,KorAPConnection-method} |
| 4 | \alias{textMetadata,KorAPConnection-method} |
| 5 | \alias{textMetadata} |
| 6 | \title{Retrieve metadata for a text, identified by its sigle (id)} |
| 7 | \usage{ |
| Marc Kupietz | a3a8cd9 | 2026-09-08 07:59:04 +0200 | [diff] [blame] | 8 | \S4method{textMetadata}{KorAPConnection}(kco, textSigle, verbose = kco@verbose, cacheAs = NULL) |
| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 9 | } |
| 10 | \arguments{ |
| Marc Kupietz | 617266d | 2025-02-27 10:43:07 +0100 | [diff] [blame] | 11 | \item{kco}{\code{\link[=KorAPConnection]{KorAPConnection()}} object (obtained e.g. from \code{KorAPConnection()})} |
| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 12 | |
| 13 | \item{textSigle}{unique text id (concatenation of corpus, document and text ids, separated by \code{/}, e.g. ) or vector thereof} |
| 14 | |
| 15 | \item{verbose}{logical. If \code{TRUE}, additional diagnostics are printed. Defaults to \code{kco@verbose}.} |
| Marc Kupietz | a3a8cd9 | 2026-09-08 07:59:04 +0200 | [diff] [blame] | 16 | |
| 17 | \item{cacheAs}{path to an RDS file to keep the result in. If the file exists and records the same call, it is read back instead of contacting the server; otherwise the query is run and its result stored there. Unlike the connection's \code{cache}, this file belongs to the caller, which is what keeps an analysis reproducible once the corpus has grown or the scores have changed. Defaults to \code{NULL} (no file).} |
| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 18 | } |
| 19 | \value{ |
| Marc Kupietz | 3687a8c | 2024-01-24 16:18:36 +0100 | [diff] [blame] | 20 | Tibble with columns for each metadata property. In case of errors, such as non-existing texts/sigles, the tibble will also contain a column called \code{errors}. |
| 21 | If there are metadata columns you cannot make sense of, please ignore them. The function simply returns all the metadata it gets from the server. |
| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 22 | } |
| 23 | \description{ |
| 24 | Retrieves metadata for a text, identified by its sigle (id) using the corresponding KorAP API |
| 25 | (see \href{https://github.com/KorAP/Kustvakt/wiki/Service:-Metadata-Retrieval}{Kustvakt Wiki}). |
| Marc Kupietz | a267c42 | 2025-06-26 10:16:20 +0200 | [diff] [blame] | 26 | To retrieve the metadata for every text in a virtual corpus, use \code{\link[=corpusQuery]{corpusQuery()}} |
| 27 | with \verb{<base/s=t>} as query, instead. |
| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 28 | } |
| 29 | \examples{ |
| 30 | \dontrun{ |
| Marc Kupietz | a267c42 | 2025-06-26 10:16:20 +0200 | [diff] [blame] | 31 | KorAPConnection() |> textMetadata(c("WUD17/A97/08542", "WUD17/B96/57558", "WUD17/A97/08541")) |
| Marc Kupietz | 6ddece4 | 2023-12-18 17:02:36 +0100 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | } |