MCPcopy Create free account
hub / github.com/docling-project/docling-parse / load_documents

Function load_documents

app/run_scaling.cpp:431–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429 }
430
431 std::vector<doc_decoder_ptr> load_documents(const std::vector<scheduled_doc>& schedule)
432 {
433 std::vector<doc_decoder_ptr> docs;
434 docs.reserve(schedule.size());
435
436 for(const auto& entry : schedule)
437 {
438 auto doc = std::make_shared<doc_decoder_type>();
439 std::string filename = entry.path.string();
440 std::optional<std::string> password = std::nullopt;
441
442 if(not doc->process_document_from_file(filename, password))
443 {
444 throw std::runtime_error("failed to load PDF: " + filename);
445 }
446
447 docs.push_back(doc);
448 }
449
450 return docs;
451 }
452
453 std::vector<page_task> build_tasks(const std::vector<scheduled_doc>& schedule)
454 {

Callers 1

mainFunction · 0.85

Calls 3

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected