MCPcopy Create free account
hub / github.com/RunanywhereAI/RCLI / process_docx

Method process_docx

src/rag/document_processor.cpp:282–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282std::vector<DocumentChunk> DocumentProcessor::process_docx(const std::string& docx_path) {
283 fprintf(stderr, "[DOC] Processing DOCX: %s\n", docx_path.c_str());
284 std::string text = extract_docx_text(docx_path);
285 if (text.empty()) {
286 fprintf(stderr, "[DOC] No text extracted from %s\n", docx_path.c_str());
287 return {};
288 }
289 std::string filename = fs::path(docx_path).filename().string();
290 auto chunks = semantic_chunk(text, filename);
291 fprintf(stderr, "[DOC] Extracted %zu chunks from %s\n", chunks.size(), filename.c_str());
292 return chunks;
293}
294
295std::vector<DocumentChunk> DocumentProcessor::process_file(const std::string& file_path) {
296 if (!fs::exists(file_path) || !fs::is_regular_file(file_path)) {

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected