This commit is contained in:
20
docs/snippets/r/config/config_programmatic.md
Normal file
20
docs/snippets/r/config/config_programmatic.md
Normal file
@@ -0,0 +1,20 @@
|
||||
```r title="R"
|
||||
library(kreuzberg)
|
||||
|
||||
config <- list(
|
||||
force_ocr = TRUE,
|
||||
ocr = list(
|
||||
backend = "tesseract",
|
||||
language = "eng"
|
||||
),
|
||||
chunking = list(
|
||||
max_characters = 2000L,
|
||||
overlap = 300L
|
||||
),
|
||||
output_format = "markdown"
|
||||
)
|
||||
|
||||
json <- extract_file_sync("document.pdf", "application/pdf", config)
|
||||
result <- jsonlite::fromJSON(json, simplifyVector = FALSE)
|
||||
cat(sprintf("MIME type: %s\n", result$mime_type))
|
||||
```
|
||||
Reference in New Issue
Block a user