Extracts the text OCRed by Document AI (DAI) in a synchronous processing request.
text_from_dai_response(
response,
save_to_file = FALSE,
dest_dir = getwd(),
filename = "output"
)
an HTTP response object returned by dai_sync()
boolean; whether to save the text as a .txt file
folder path for the .txt output file if save_to_file = TRUE
string to form the stem of the .txt output file
a string (if save_to_file = FALSE
)
if (FALSE) {
text <- text_from_dai_response(response)
text_from_dai_response(response, save_to_file = TRUE)
}